Skip to content

Commit

Permalink
Deactivate on all ecommerce-related plans (incl. WPCOM and trial)
Browse files Browse the repository at this point in the history
  • Loading branch information
waclawjacek committed Apr 19, 2024
1 parent 61d6b1e commit f48919d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions class-wc-calypso-bridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function_exists( 'WC' ) &&
*/
public function __construct() {
add_action( 'muplugins_loaded', array( $this, 'deactivate_duplicate_tiktok' ), PHP_INT_MAX );
add_action( 'muplugins_loaded', array( $this, 'deactivate_wc_services_if_woo_shipping_or_woo_tax_is_active'), PHP_INT_MAX );
add_action( 'muplugins_loaded', array( $this, 'deactivate_wc_services_if_woo_shipping_or_woo_tax_is_active_on_ecomm_plans'), PHP_INT_MAX );
add_action( 'plugins_loaded', array( $this, 'initialize' ), 0 );
add_action( 'plugins_loaded', array( $this, 'load_translation' ) );
}
Expand All @@ -98,13 +98,14 @@ public function deactivate_duplicate_tiktok() {
}

/**
* Deactivate WooCommerce Services if either Woo Shipping or Woo Tax is active.
* Deactivate WooCommerce Services if either Woo Shipping or Woo Tax is active on an ecommerce-related plan
* (on WPCOM and Woo Express, including trial plans).
*
* @since x.x.x
*
*/
public function deactivate_wc_services_if_woo_shipping_or_woo_tax_is_active() {
if ( ! wc_calypso_bridge_is_woo_express_plan() ) {
public function deactivate_wc_services_if_woo_shipping_or_woo_tax_is_active_on_ecomm_plans() {
if ( ! wc_calypso_bridge_has_ecommerce_features() ) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This section describes how to install the plugin and get it working.
== Changelog ==

= Unreleased =
* Deactivate WooCommerce Services if either Woo Shipping or Woo Tax is active #1458
* Deactivate WooCommerce Services if either Woo Shipping or Woo Tax is active on an ecommerce-related plan (on WPCOM and Woo Express, including trial plans) #xxx

= 2.3.12 =
* Update DataSourcePoller import since after refactor in core #1450
Expand Down

0 comments on commit f48919d

Please sign in to comment.