Bootstrap::__construct()publicWC 1.0


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

Хуки из метода


null. Ничего.


$Bootstrap = new Bootstrap();
$Bootstrap->__construct( $container );
$container(Container) (обязательный)
The Dependency Injection Container.

Код Bootstrap::__construct() WC 7.5.1

public function __construct( Container $container ) {
	$this->container = $container;
	$this->package   = $container->get( Package::class );
	$this->migration = $container->get( Migration::class );

	if ( $this->has_core_dependencies() ) {
		 * Fires when the woocommerce blocks are loaded and ready to use.
		 * This hook is intended to be used as a safe event hook for when the plugin
		 * has been loaded, and all dependency requirements have been met.
		 * To ensure blocks are initialized, you must use the `woocommerce_blocks_loaded`
		 * hook instead of the `plugins_loaded` hook. This is because the functions
		 * hooked into plugins_loaded on the same priority load in an inconsistent and unpredictable manner.
		do_action( 'woocommerce_blocks_loaded' );