Automattic\WooCommerce\Blocks

BlockPatterns::__construct()publicWC 1.0

Constructor for class

Метод класса: BlockPatterns{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

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

Код BlockPatterns::__construct() WC 9.3.3

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;

	$this->dictionary = PatternsHelper::get_patterns_dictionary();

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

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