Cleanup references to is_ecommerce

This commit is contained in:
Panos (Panagiotis) Synetos 2023-11-06 13:19:33 +02:00
parent f97804e4bf
commit 15da9903d4
No known key found for this signature in database
GPG Key ID: 0404F1D7F00137F9
1 changed files with 3 additions and 9 deletions

View File

@ -1,7 +1,6 @@
<?php
/**
* Rule processor that passes (or fails) when the site is on the eCommerce
* plan.
* Rule processor that passes (or fails) when the site is on a Woo Express plan.
*
* @package WooCommerce\Admin\Classes
*/
@ -11,8 +10,8 @@ namespace Automattic\WooCommerce\Admin\RemoteInboxNotifications;
defined( 'ABSPATH' ) || exit;
/**
* Rule processor that passes (or fails) when the site is on the Woo Express plan.
* You may optionally pass a plan name to target specific 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 a specific Woo Express plan.
*/
class IsWooExpressRuleProcessor implements RuleProcessorInterface {
/**
@ -40,11 +39,6 @@ class IsWooExpressRuleProcessor implements RuleProcessorInterface {
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.
return false === $rule->value;
}