Automattic\WooCommerce\Blocks\Patterns
PTKPatternsStore::schedule_action_if_not_pending
Schedule an action if it's not already pending.
Метод класса: PTKPatternsStore{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->schedule_action_if_not_pending( $action );
- $action(строка) (обязательный)
- The action name to schedule.
Код PTKPatternsStore::schedule_action_if_not_pending() PTKPatternsStore::schedule action if not pending WC 10.4.3
private function schedule_action_if_not_pending( $action ) {
if ( as_has_scheduled_action( $action, array(), 'woocommerce' ) ) {
return;
}
as_schedule_recurring_action( time(), DAY_IN_SECONDS, $action, array(), 'woocommerce' );
}