Cleanup references to is_ecommerce
This commit is contained in:
parent
f97804e4bf
commit
15da9903d4
|
@ -1,7 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Rule processor that passes (or fails) when the site is on the eCommerce
|
* Rule processor that passes (or fails) when the site is on a Woo Express plan.
|
||||||
* plan.
|
|
||||||
*
|
*
|
||||||
* @package WooCommerce\Admin\Classes
|
* @package WooCommerce\Admin\Classes
|
||||||
*/
|
*/
|
||||||
|
@ -11,8 +10,8 @@ namespace Automattic\WooCommerce\Admin\RemoteInboxNotifications;
|
||||||
defined( 'ABSPATH' ) || exit;
|
defined( 'ABSPATH' ) || exit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rule processor that passes (or fails) when the site is on the Woo Express plan.
|
* Rule processor that passes (or fails) when the site is on a Woo Express plan.
|
||||||
* You may optionally pass a plan name to target specific Woo Express plan.
|
* You may optionally pass a plan name to target a specific Woo Express plan.
|
||||||
*/
|
*/
|
||||||
class IsWooExpressRuleProcessor implements RuleProcessorInterface {
|
class IsWooExpressRuleProcessor implements RuleProcessorInterface {
|
||||||
/**
|
/**
|
||||||
|
@ -40,11 +39,6 @@ class IsWooExpressRuleProcessor implements RuleProcessorInterface {
|
||||||
return $fn() === $rule->value;
|
return $fn() === $rule->value;
|
||||||
}
|
}
|
||||||
|
|
||||||
$fn = 'wc_calypso_bridge_is_ecommerce_' . (string) $rule->plan . '_plan';
|
|
||||||
if ( function_exists( $fn ) ) {
|
|
||||||
return $fn() === $rule->value;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If an invalid plan name is given, only evaluate the rule if we're targeting all plans other than the specified (invalid) one.
|
// If an invalid plan name is given, only evaluate the rule if we're targeting all plans other than the specified (invalid) one.
|
||||||
return false === $rule->value;
|
return false === $rule->value;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue