Action_Scheduler\WP_CLI\Action
Run_Command::__construct
Construct.
Method of the class: Run_Command{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Run_Command = new Run_Command(); $Run_Command->__construct( $args, $assoc_args );
- $args(string[]) (required)
- Positional arguments.
- $assoc_args(array) (required)
- .
Run_Command::__construct() Run Command:: construct code WC 10.5.0
public function __construct( array $args, array $assoc_args ) {
parent::__construct( $args, $assoc_args );
$this->action_ids = array_map( 'absint', $args );
$this->action_counts['total'] = count( $this->action_ids );
add_action( 'action_scheduler_execution_ignored', array( $this, 'on_action_ignored' ) );
add_action( 'action_scheduler_after_execute', array( $this, 'on_action_executed' ) );
add_action( 'action_scheduler_failed_execution', array( $this, 'on_action_failed' ), 10, 2 );
add_action( 'action_scheduler_failed_validation', array( $this, 'on_action_invalid' ), 10, 2 );
}