Action_Scheduler\WP_CLI\Action
Run_Command::on_action_executed
Action: action_scheduler_after_execute
Method of the class: Run_Command{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Run_Command = new Run_Command(); $Run_Command->on_action_executed( $action_id );
- $action_id(int) (required)
- Action ID.
Run_Command::on_action_executed() Run Command::on action executed code WC 10.6.2
public function on_action_executed( $action_id ) {
if ( 'action_scheduler_after_execute' !== current_action() ) {
return;
}
$action_id = absint( $action_id );
if ( ! in_array( $action_id, $this->action_ids, true ) ) {
return;
}
$this->action_counts['executed']++;
\WP_CLI::debug( sprintf( 'Action %d was executed.', $action_id ) );
}