Package
Main package class.
Description Description
Returns information about the package and handles init.
In the context of this plugin, it handles init and is called from the main plugin file (woocommerce-gutenberg-products-block.php).
In the context of WooCommere core, it handles init and is called from WooCommerce’s package loader. The main plugin file is not loaded.
Source Source
File: packages/woocommerce-blocks/src/Package.php
Changelog Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |
Methods Methods
- container — Loads the dependency injection container for woocommerce blocks.
- feature — Returns an instance of the the FeatureGating class.
- get_package — For back compat this is provided. Ideally, you should register your class with Automattic\Woocommerce\Blocks\Container and make Package a dependency.
- get_path — Return the path to the package.
- get_version — Return the version of the package.
- init — Init the package - load the blocks library and define constants.
- is_experimental_build — Checks if we're executing the code in an experimental build mode.
- is_feature_plugin_build — Checks if we're executing the code in an feature plugin or experimental build mode.