Automattic\WooCommerce\Admin\RemoteInboxNotifications
RuleProcessorInterface{}
Устарела с версии 9.4.0. Больше не поддерживается и может быть удалена. Используйте
\Automattic\WooCommerce\Admin\RemoteSpecs\RuleProcessors\RuleProcessorInterface.Rule processor interface
Хуков нет.
Использование
$RuleProcessorInterface = new RuleProcessorInterface(); // use class methods
Методы
- public process( $rule, $stored_state )
- public validate( $rule )
- ERROR: no method name found on line `* @param object $stored_state Stored state.`
- ERROR: no method name found on line `* @param object $rule The rule to validate.`
Список изменений
| Устарела с 9.4.0 | Use \Automattic\WooCommerce\Admin\RemoteSpecs\RuleProcessors\RuleProcessorInterface instead. |
Код RuleProcessorInterface{} RuleProcessorInterface{} WC 10.9.4
interface RuleProcessorInterface {
/**
* Processes a rule, returning the boolean result of the processing.
*
* @param object $rule The rule to process.
* @param object $stored_state Stored state.
*
* @return bool The result of the processing.
*/
public function process( $rule, $stored_state );
/**
* Validates the rule.
*
* @param object $rule The rule to validate.
*
* @return bool Pass/fail.
*/
public function validate( $rule );
}