Submit
Path:
~
/
home
/
getwphos
/
www
/
almajd14
/
wp-content
/
plugins
/
woocommerce
/
src
/
Admin
/
RemoteSpecs
/
RuleProcessors
/
File Content:
IsWooExpressRuleProcessor.php
<?php /** * Rule processor that passes (or fails) when the site is on a Woo Express plan. * * @package WooCommerce\Admin\Classes */ namespace Automattic\WooCommerce\Admin\RemoteSpecs\RuleProcessors; defined( 'ABSPATH' ) || exit; /** * 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 { /** * Passes (or fails) based on whether the site is a Woo Express plan. * * @param object $rule The rule being processed by this rule processor. * @param object $stored_state Stored state. * * @return bool The result of the operation. */ public function process( $rule, $stored_state ) { if ( ! function_exists( 'wc_calypso_bridge_is_woo_express_plan' ) ) { return false === $rule->value; } // If the plan is undefined, only check if it's a Woo Express plan. if ( ! isset( $rule->plan ) ) { return wc_calypso_bridge_is_woo_express_plan() === $rule->value; } // If a plan name is defined, only evaluate the plan if we're on the Woo Express plan. if ( wc_calypso_bridge_is_woo_express_plan() ) { $fn = 'wc_calypso_bridge_is_woo_express_' . (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; } return false; } /** * Validate the rule. * * @param object $rule The rule to validate. * * @return bool Pass/fail. */ public function validate( $rule ) { if ( ! isset( $rule->value ) ) { return false; } if ( isset( $rule->plan ) ) { if ( ! function_exists( 'wc_calypso_bridge_is_woo_express_plan' ) ) { return false; } } return true; } }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
Transformers
---
0755
BaseLocationCountryRuleProcessor.php
2029 bytes
0644
BaseLocationStateRuleProcessor.php
1261 bytes
0644
ComparisonOperation.php
2460 bytes
0644
ContextPluginsRuleProcessor.php
1870 bytes
0644
EvaluateAndGetStatus.php
1892 bytes
0644
EvaluateOverrides.php
2421 bytes
0644
EvaluationLogger.php
2100 bytes
0644
FailRuleProcessor.php
691 bytes
0644
GetRuleProcessor.php
2093 bytes
0644
GetRuleProcessorForContext.php
1073 bytes
0644
IsEcommerceRuleProcessor.php
1139 bytes
0644
IsWooExpressRuleProcessor.php
1920 bytes
0644
NotRuleProcessor.php
1344 bytes
0644
NoteStatusRuleProcessor.php
1324 bytes
0644
OnboardingProfileRuleProcessor.php
1447 bytes
0644
OptionRuleProcessor.php
3198 bytes
0644
OrRuleProcessor.php
1514 bytes
0644
OrderCountRuleProcessor.php
1342 bytes
0644
OrdersProvider.php
705 bytes
0644
PassRuleProcessor.php
777 bytes
0644
PluginVersionRuleProcessor.php
2227 bytes
0644
PluginsActivatedRuleProcessor.php
1875 bytes
0644
ProductCountRuleProcessor.php
1668 bytes
0644
PublishAfterTimeRuleProcessor.php
1502 bytes
0644
PublishBeforeTimeRuleProcessor.php
1508 bytes
0644
RuleEvaluator.php
2505 bytes
0644
RuleProcessorInterface.php
659 bytes
0644
StoredStateRuleProcessor.php
1256 bytes
0644
StoredStateSetupForProducts.php
3692 bytes
0644
TotalPaymentsVolumeProcessor.php
2536 bytes
0644
WCAdminActiveForProvider.php
505 bytes
0644
WCAdminActiveForRuleProcessor.php
2026 bytes
0644
WooCommerceAdminUpdatedRuleProcessor.php
974 bytes
0644
N4ST4R_ID | Naxtarrr