Automattic\WooCommerce\Internal\Features

BlockEditorUnifiedAssets{} │ final │ WC 1.0

Feature gate for unified WooCommerce block editor assets.

No Hooks.

Usage

$BlockEditorUnifiedAssets = new BlockEditorUnifiedAssets();
// use class methods

Methods

  1. public static is_enabled()

BlockEditorUnifiedAssets{} code WC 11.1.2

final class BlockEditorUnifiedAssets {

	/**
	 * Feature Name.
	 */
	public const FEATURE_NAME = 'block_editor_unified_assets';

	/**
	 * Option that stores whether the feature is enabled.
	 */
	public const OPTION_NAME = 'woocommerce_feature_block_editor_unified_assets_enabled';

	/**
	 * Check whether unified block editor assets are enabled.
	 *
	 * @return bool True when unified block editor assets are enabled.
	 *
	 * @since 11.1.0
	 */
	public static function is_enabled(): bool {
		return FeaturesUtil::feature_is_enabled( self::FEATURE_NAME );
	}
}