ActionScheduler_WPCLI_QueueRunner::after_execute
Handle WP CLI message when the action has completed.
Method of the class: ActionScheduler_WPCLI_QueueRunner{}
No Hooks.
Returns
null. Nothing (null).
Usage
$ActionScheduler_WPCLI_QueueRunner = new ActionScheduler_WPCLI_QueueRunner(); $ActionScheduler_WPCLI_QueueRunner->after_execute( $action_id, $action );
- $action_id(int) (required)
- ActionID.
- $action(null|ActionScheduler_Action)
- The instance of the action.
Default: null for backward compatibility
ActionScheduler_WPCLI_QueueRunner::after_execute() ActionScheduler WPCLI QueueRunner::after execute code WC 10.3.6
public function after_execute( $action_id, $action = null ) {
// backward compatibility.
if ( null === $action ) {
$action = $this->store->fetch_action( $action_id );
}
/* translators: 1: action ID 2: hook name */
WP_CLI::log( sprintf( __( 'Completed processing action %1$s with hook: %2$s', 'woocommerce' ), $action_id, $action->get_hook() ) );
}