Transformers
1 year ago
BaseLocationCountryRuleProcessor.php
2 years ago
BaseLocationStateRuleProcessor.php
2 years ago
ComparisonOperation.php
2 years ago
ContextPluginsRuleProcessor.php
1 year ago
EvaluateAndGetStatus.php
2 years ago
EvaluateOverrides.php
1 year ago
EvaluationLogger.php
1 year ago
FailRuleProcessor.php
2 years ago
GetRuleProcessor.php
2 years ago
GetRuleProcessorForContext.php
1 year ago
IsEcommerceRuleProcessor.php
2 years ago
IsWooExpressRuleProcessor.php
2 years ago
NotRuleProcessor.php
2 years ago
NoteStatusRuleProcessor.php
2 years ago
OnboardingProfileRuleProcessor.php
2 years ago
OptionRuleProcessor.php
2 years ago
OrRuleProcessor.php
2 years ago
OrderCountRuleProcessor.php
2 years ago
OrdersProvider.php
2 years ago
PassRuleProcessor.php
2 years ago
PluginVersionRuleProcessor.php
2 years ago
PluginsActivatedRuleProcessor.php
2 years ago
ProductCountRuleProcessor.php
1 year ago
PublishAfterTimeRuleProcessor.php
2 years ago
PublishBeforeTimeRuleProcessor.php
2 years ago
RuleEvaluator.php
1 year ago
RuleProcessorInterface.php
2 years ago
StoredStateRuleProcessor.php
2 years ago
StoredStateSetupForProducts.php
2 years ago
TotalPaymentsVolumeProcessor.php
1 year ago
WCAdminActiveForProvider.php
2 years ago
WCAdminActiveForRuleProcessor.php
2 years ago
WooCommerceAdminUpdatedRuleProcessor.php
2 years ago
WooCommerceAdminUpdatedRuleProcessor.php
39 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Rule processor for sending when WooCommerce Admin has been updated. |
| 4 | */ |
| 5 | |
| 6 | namespace Automattic\WooCommerce\Admin\RemoteSpecs\RuleProcessors; |
| 7 | |
| 8 | use Automattic\WooCommerce\Admin\RemoteInboxNotifications\RemoteInboxNotificationsEngine; |
| 9 | |
| 10 | defined( 'ABSPATH' ) || exit; |
| 11 | |
| 12 | /** |
| 13 | * Rule processor for sending when WooCommerce Admin has been updated. |
| 14 | */ |
| 15 | class WooCommerceAdminUpdatedRuleProcessor implements RuleProcessorInterface { |
| 16 | /** |
| 17 | * Process the rule. |
| 18 | * |
| 19 | * @param object $rule The specific rule being processed by this rule processor. |
| 20 | * @param object $stored_state Stored state. |
| 21 | * |
| 22 | * @return bool Whether the rule passes or not. |
| 23 | */ |
| 24 | public function process( $rule, $stored_state ) { |
| 25 | return get_option( RemoteInboxNotificationsEngine::WCA_UPDATED_OPTION_NAME, false ); |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * Validates the rule. |
| 30 | * |
| 31 | * @param object $rule The rule to validate. |
| 32 | * |
| 33 | * @return bool Pass/fail. |
| 34 | */ |
| 35 | public function validate( $rule ) { |
| 36 | return true; |
| 37 | } |
| 38 | } |
| 39 |