Automattic\WooCommerce\Admin\RemoteSpecs\RuleProcessors

RuleProcessorInterface{} │ interface │ WC 1.0

Rule processor interface

Хуков нет.

Использование

$RuleProcessorInterface = new RuleProcessorInterface();
// use class methods

Методы

  1. public process( $rule, $stored_state )
  2. public validate( $rule )
  3. ERROR: no method name found on line `*`
  4. ERROR: no method name found on line ``

Код RuleProcessorInterface{} WC 11.3.0

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 );
}