Automattic\WooCommerce\Blocks

BlockTemplatesController::__construct()publicWC 1.0

Constructor.

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

Хуков нет.

Возвращает

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

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

$BlockTemplatesController = new BlockTemplatesController();
$BlockTemplatesController->__construct( $package );
$package(Package) (обязательный)
An instance of Package.

Код BlockTemplatesController::__construct() WC 8.7.0

public function __construct( Package $package ) {
	$this->package = $package;

	$feature_gating                                 = $package->feature();
	$is_block_templates_controller_refactor_enabled = $feature_gating->is_block_templates_controller_refactor_enabled();

	// This feature is gated for WooCommerce versions 6.0.0 and above.
	if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '6.0.0', '>=' ) && ! $is_block_templates_controller_refactor_enabled ) {
		$this->init();
	}
}