ActionScheduler_WPCLI_Command::__construct()
Construct.
Method of the class: ActionScheduler_WPCLI_Command{}
No Hooks.
Return
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 9.8.1
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; }