Automattic\WooCommerce\Blueprint
ImportStep::__construct
ImportStep constructor.
Method of the class: ImportStep{}
Hooks from the method
Returns
null. Nothing (null).
Usage
$ImportStep = new ImportStep(); $ImportStep->__construct( $step_definition, ?Validator $validator );
- $step_definition(object) (required)
- The step definition.
- ?Validator $validator
- .
Default:null
ImportStep::__construct() ImportStep:: construct code WC 10.7.0
public function __construct( $step_definition, ?Validator $validator = null ) {
$this->step_definition = $step_definition;
if ( null === $validator ) {
$validator = new Validator();
}
$this->validator = $validator;
$this->importers = $this->wp_apply_filters( 'wooblueprint_importers', ( ( new BuiltInStepProcessors() )->get_all() ) );
$this->indexed_importers = Util::index_array(
$this->importers,
function ( $key, $importer ) {
return $importer->get_step_class()::get_step_name();
}
);
}