as_unschedule_all_actions()
Cancel all occurrences of a scheduled action.
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
as_unschedule_all_actions( $hook, $args, $group );
- $hook(строка) (обязательный)
- The hook that the job will trigger.
- $args(массив)
- Args that would have been passed to the job.
По умолчанию: array() - $group(строка)
- The group the job is assigned to.
По умолчанию: ''
Код as_unschedule_all_actions() as unschedule all actions WC 8.7.0
function as_unschedule_all_actions( $hook, $args = array(), $group = '' ) { if ( ! ActionScheduler::is_initialized( __FUNCTION__ ) ) { return; } if ( empty( $args ) ) { if ( ! empty( $hook ) && empty( $group ) ) { ActionScheduler_Store::instance()->cancel_actions_by_hook( $hook ); return; } if ( ! empty( $group ) && empty( $hook ) ) { ActionScheduler_Store::instance()->cancel_actions_by_group( $group ); return; } } do { $unscheduled_action = as_unschedule_action( $hook, $args, $group ); } while ( ! empty( $unscheduled_action ) ); }