ActionScheduler_WPCLI_Command::__construct
Construct.
Method of the class: ActionScheduler_WPCLI_Command{}
No Hooks.
Returns
null. Nothing (null).
Usage
$ActionScheduler_WPCLI_Command = new ActionScheduler_WPCLI_Command(); $ActionScheduler_WPCLI_Command->__construct( $args, $assoc_args );
- $args(string[]) (required)
- Positional arguments.
- $assoc_args(array) (required)
- .
ActionScheduler_WPCLI_Command::__construct() ActionScheduler WPCLI Command:: construct code WC 10.6.2
public function __construct( array $args, array $assoc_args ) {
if ( ! defined( 'WP_CLI' ) || ! constant( 'WP_CLI' ) ) {
/* translators: %s php class name */
throw new \Exception( sprintf( __( 'The %s class can only be run within WP CLI.', 'woocommerce' ), get_class( $this ) ) );
}
$this->args = $args;
$this->assoc_args = $assoc_args;
}