Automattic\WooCommerce\Admin\RemoteInboxNotifications

FailRuleProcessor{}WC 1.0

Rule processor that fails.

Хуков нет.

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

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

Методы

  1. public process( $rule, $stored_state )
  2. public validate( $rule )

Код FailRuleProcessor{} WC 7.1.0

class FailRuleProcessor implements RuleProcessorInterface {
	/**
	 * Fails the rule.
	 *
	 * @param object $rule         The specific rule being processed by this rule processor.
	 * @param object $stored_state Stored state.
	 *
	 * @return bool Always false.
	 */
	public function process( $rule, $stored_state ) {
		return false;
	}

	/**
	 * Validates the rule.
	 *
	 * @param object $rule The rule to validate.
	 *
	 * @return bool Pass/fail.
	 */
	public function validate( $rule ) {
		return true;
	}
}