Automattic\WooCommerce\Blocks

BlockPatterns::__construct()publicWC 1.0

Constructor for class

Method of the class: BlockPatterns{}

No Hooks.

Return

null. Nothing (null).

Usage

$BlockPatterns = new BlockPatterns();
$BlockPatterns->__construct(;

BlockPatterns::__construct() code WC 9.4.2

public function __construct(
	Package $package,
	PatternRegistry $pattern_registry,
	PTKPatternsStore $ptk_patterns_store
) {
	$this->patterns_path      = $package->get_path( 'patterns' );
	$this->pattern_registry   = $pattern_registry;
	$this->ptk_patterns_store = $ptk_patterns_store;

	add_action( 'init', array( $this, 'register_block_patterns' ) );

	if ( Features::is_enabled( 'pattern-toolkit-full-composability' ) ) {
		add_action( 'init', array( $this, 'register_ptk_patterns' ) );
	}
}