From 9162aafbb287ed9937032b2f012209158bbb7d47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=C3=ADna=20Vysko=C4=8Dilov=C3=A1?= Date: Fri, 13 May 2022 11:04:55 +0200 Subject: [PATCH] remove deactivation + compatibility check --- README.txt | 11 ++++++++--- woocommerce-payforpayment.php | 14 ++------------ 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/README.txt b/README.txt index 9268ee7..c16012d 100644 --- a/README.txt +++ b/README.txt @@ -3,8 +3,8 @@ Contributors: vyskoczilova, podpirate Donate link: https://paypal.me/KarolinaVyskocilova Tags: ecommerce, woocommerce, payment gateway, fee Requires at least: 4.6 -Tested up to: 5.8 -Stable tag: 2.1.5 +Tested up to: 6.0 +Stable tag: 2.1.6 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -31,11 +31,12 @@ Requires at least WooCommerce 2.6, compatible with WooCommerce 3.2+ (recommended - **Plugin API**. See [GitHub](https://github.com/vyskoczilova/woocommerce-payforpayment) for details. = Compatibility = -- **Currently not compatible with [WooCommerce Stripe Payment Gateway](https://wordpress.org/plugins/woocommerce-gateway-stripe/)** since it's React powered and I can't hook in. Use [Payment Plugins for Stripe WooCommerce](https://wordpress.org/plugins/woo-stripe-payment/) instead for now. +- **Currently not compatible with [WooCommerce Stripe Payment Gateway](https://wordpress.org/plugins/woocommerce-gateway-stripe/)** since it's React powered and I can't hook in. Use [Payment Plugins for Stripe WooCommerce](https://wordpress.org/plugins/woo-stripe-payment/) instead for now, waiting for their team to resolve the problem. - **WPML** (see [FAQ](https://wordpress.org/plugins/woocommerce-pay-for-payment#faq)) - [WooCommerce Price Based on Country for WooCommerce](https://wordpress.org/plugins/woocommerce-product-price-based-on-countries/) & PRO - [Multi Currency for WooCommerce](https://wordpress.org/plugins/woo-multi-currency/) & PRO - [WooCommerce Multi-Currency](https://woocommerce.com/products/multi-currency/) when the store currency is USD +- [YayCurrency PRO](https://yaycommerce.com/yaycurrency-woocommerce-multi-currency-switcher/) = Limitations = - It seems that Mercadopago gateway is not handling WC_Fee correctly. Get in touch with Mercadopago support (and I'm happy to help them fix the issue) @@ -103,6 +104,10 @@ Either post it on [GitHub](https://github.com/vyskoczilova/woocommerce-payforpay == Changelog == += 2.1.5 (2022-05-13) + +* Fix: Don't deactivate the plugin even when the WooCommerce is not active (keep a notice only). + = 2.1.5 (2022-03-21) = * Feature: Add `[MINIMUM_AMOUNT]` and `[MAXIMUM_AMOUNT]` placeholders to fee title diff --git a/woocommerce-payforpayment.php b/woocommerce-payforpayment.php index 998faed..8b2ccc1 100644 --- a/woocommerce-payforpayment.php +++ b/woocommerce-payforpayment.php @@ -3,7 +3,7 @@ Plugin Name: Pay for Payment for WooCommerce Plugin URI: https://kybernaut.cz/pluginy/woocommerce-pay-for-payment/ Description: Setup individual charges for each payment method in WooCommerce. -Version: 2.1.5 +Version: 2.1.6 Author: Karolína Vyskočilová Author URI: https://kybernaut.cz License: GPL-2.0+ @@ -11,7 +11,7 @@ Text Domain: woocommerce-pay-for-payment Domain Path: /languages WC requires at least: 2.6 -WC tested up to: 6.3.1 +WC tested up to: 6.5.1 */ /** @@ -24,7 +24,6 @@ function pay4payment_plugin_init() { if ( current_user_can( 'activate_plugins' ) && ! class_exists( 'woocommerce' ) ) { - add_action( 'admin_init', 'pay4payment_deactivate' ); add_action( 'admin_notices', 'pay4payment_admin_notice' ); } else { @@ -61,12 +60,3 @@ function pay4payment_admin_notice() { unset( $_GET['activate'] ); } } - -/** - * Deactivate the plugin. - * - * @return void - */ -function pay4payment_deactivate() { - deactivate_plugins( plugin_basename( __FILE__ ) ); -}