OrderDetailRedesign
2 months ago
BlockEditorUnifiedAssets.php
2 weeks ago
FeaturesController.php
1 week ago
BlockEditorUnifiedAssets.php
38 lines
| 1 | <?php |
| 2 | /** |
| 3 | * BlockEditorUnifiedAssets class file. |
| 4 | */ |
| 5 | |
| 6 | declare( strict_types = 1 ); |
| 7 | |
| 8 | namespace Automattic\WooCommerce\Internal\Features; |
| 9 | |
| 10 | use Automattic\WooCommerce\Utilities\FeaturesUtil; |
| 11 | |
| 12 | /** |
| 13 | * Feature gate for unified WooCommerce block editor assets. |
| 14 | */ |
| 15 | final class BlockEditorUnifiedAssets { |
| 16 | |
| 17 | /** |
| 18 | * Feature Name. |
| 19 | */ |
| 20 | public const FEATURE_NAME = 'block_editor_unified_assets'; |
| 21 | |
| 22 | /** |
| 23 | * Option that stores whether the feature is enabled. |
| 24 | */ |
| 25 | public const OPTION_NAME = 'woocommerce_feature_block_editor_unified_assets_enabled'; |
| 26 | |
| 27 | /** |
| 28 | * Check whether unified block editor assets are enabled. |
| 29 | * |
| 30 | * @return bool True when unified block editor assets are enabled. |
| 31 | * |
| 32 | * @since 11.1.0 |
| 33 | */ |
| 34 | public static function is_enabled(): bool { |
| 35 | return FeaturesUtil::feature_is_enabled( self::FEATURE_NAME ); |
| 36 | } |
| 37 | } |
| 38 |