ActionScheduler_Action::execute()publicWC 1.0

Executes the action.

If no callbacks are registered, an exception will be thrown and the action will not be fired. This is useful to help detect cases where the code responsible for setting up a scheduled action no longer exists.

Метод класса: ActionScheduler_Action{}

Хуки из метода


null. Ничего (null).


$ActionScheduler_Action = new ActionScheduler_Action();

Код ActionScheduler_Action::execute() WC 8.9.0

public function execute() {
	$hook = $this->get_hook();

	if ( ! has_action( $hook ) ) {
		throw new Exception(
				/* translators: 1: action hook. */
				__( 'Scheduled action for %1$s will not be executed as no callbacks are registered.', 'woocommerce' ),

	do_action_ref_array( $hook, array_values( $this->get_args() ) );