WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
класс не описан

Automattic\WooCommerce\Admin\RemoteInboxNotifications

WooCommerceAdminUpdatedRuleProcessor{} WC 1.0

Rule processor for sending when WooCommerce Admin has been updated.

Хуков нет.

Возвращает

null. Ничего.

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

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

Методы

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

Код WooCommerceAdminUpdatedRuleProcessor{} WC 5.4.1

<?php
class WooCommerceAdminUpdatedRuleProcessor implements RuleProcessorInterface {
	/**
	 * Process the rule.
	 *
	 * @param object $rule         The specific rule being processed by this rule processor.
	 * @param object $stored_state Stored state.
	 *
	 * @return bool Whether the rule passes or not.
	 */
	public function process( $rule, $stored_state ) {
		return get_option( RemoteInboxNotificationsEngine::WCA_UPDATED_OPTION_NAME, false );
	}

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