Automattic\WooCommerce\Admin\RemoteInboxNotifications
BaseLocationStateRuleProcessor::process() public WC 1.0
Performs a comparison operation against the base location - state.
{} Это метод класса: BaseLocationStateRuleProcessor{}
Хуков нет.
Возвращает
true/false. The result of the operation.
Использование
$BaseLocationStateRuleProcessor = new BaseLocationStateRuleProcessor(); $BaseLocationStateRuleProcessor->process( $rule, $stored_state );
- $rule(объект) (обязательный)
- The specific rule being processed by this rule processor.
- $stored_state(объект) (обязательный)
- Stored state.
Код BaseLocationStateRuleProcessor::process() BaseLocationStateRuleProcessor::process WC 5.0.0
public function process( $rule, $stored_state ) {
$base_location = wc_get_base_location();
if ( ! $base_location ) {
return false;
}
return ComparisonOperation::compare(
$base_location['state'],
$rule->value,
$rule->operation
);
}