Skip to content

Commit

Permalink
remove deactivation + compatibility check
Browse files Browse the repository at this point in the history
  • Loading branch information
vyskoczilova committed May 13, 2022
1 parent e38f385 commit 9162aaf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
11 changes: 8 additions & 3 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down
14 changes: 2 additions & 12 deletions woocommerce-payforpayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
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+
License URI: http://www.gnu.org/licenses/gpl-2.0.txt
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
*/

/**
Expand All @@ -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 {
Expand Down Expand Up @@ -61,12 +60,3 @@ function pay4payment_admin_notice() {
unset( $_GET['activate'] );
}
}

/**
* Deactivate the plugin.
*
* @return void
*/
function pay4payment_deactivate() {
deactivate_plugins( plugin_basename( __FILE__ ) );
}

0 comments on commit 9162aaf

Please sign in to comment.