action_scheduler_stored_action_instance
Allow 3rd party code to change the instantiated action for a given hook, args, schedule and group.
Использование
add_filter( 'action_scheduler_stored_action_instance', 'wp_kama_action_scheduler_stored_instance_filter', 10, 6 ); /** * Function for `action_scheduler_stored_action_instance` filter-hook. * * @param ActionScheduler_Action $action The instantiated action. * @param string $hook The instantiated action's hook. * @param array $args The instantiated action's args. * @param ActionScheduler_Schedule $schedule The instantiated action's schedule. * @param string $group The instantiated action's group. * @param int $priority The action priority. * * @return ActionScheduler_Action */ function wp_kama_action_scheduler_stored_instance_filter( $action, $hook, $args, $schedule, $group, $priority ){ // filter... return $action; }
- $action(ActionScheduler_Action)
- The instantiated action.
- $hook(строка)
- The instantiated action's hook.
- $args(массив)
- The instantiated action's args.
- $schedule(ActionScheduler_Schedule)
- The instantiated action's schedule.
- $group(строка)
- The instantiated action's group.
- $priority(int)
- The action priority.
Где вызывается хук
action_scheduler_stored_action_instance
woocommerce/packages/action-scheduler/classes/ActionScheduler_ActionFactory.php 56
return apply_filters( 'action_scheduler_stored_action_instance', $action, $hook, $args, $schedule, $group, $priority );