Rename ProductTemplate namespace (#45594)
* Rename ProductTemplate namespace * Add changelog * Fix loader
This commit is contained in:
parent
21f2a15e97
commit
184459b359
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: minor
|
||||||
|
Type: fix
|
||||||
|
|
||||||
|
Rename ProductTemplate namespace #45594
|
|
@ -10,8 +10,8 @@ use Automattic\WooCommerce\Admin\Features\ProductBlockEditor\ProductTemplate;
|
||||||
use Automattic\WooCommerce\Admin\PageController;
|
use Automattic\WooCommerce\Admin\PageController;
|
||||||
use Automattic\WooCommerce\LayoutTemplates\LayoutTemplateRegistry;
|
use Automattic\WooCommerce\LayoutTemplates\LayoutTemplateRegistry;
|
||||||
|
|
||||||
use Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates\SimpleProductTemplate;
|
use Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates\SimpleProductTemplate;
|
||||||
use Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates\ProductVariationTemplate;
|
use Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates\ProductVariationTemplate;
|
||||||
|
|
||||||
use WP_Block_Editor_Context;
|
use WP_Block_Editor_Context;
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ class Loader extends DeprecatedClassFacade {
|
||||||
* @deprecated since 5.0.0, use Features::is_enabled( $feature )
|
* @deprecated since 5.0.0, use Features::is_enabled( $feature )
|
||||||
*/
|
*/
|
||||||
public static function is_feature_enabled( $feature ) {
|
public static function is_feature_enabled( $feature ) {
|
||||||
wc_deprecated_function( 'is_feature_enabled', '5.0', '\Automattic\WooCommerce\Internal\Admin\Features\Features::is_enabled()' );
|
wc_deprecated_function( 'is_feature_enabled', '5.0', '\Automattic\WooCommerce\Internal\Features\Features::is_enabled()' );
|
||||||
return Features::is_enabled( $feature );
|
return Features::is_enabled( $feature );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates;
|
namespace Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates;
|
||||||
|
|
||||||
use Automattic\WooCommerce\Admin\BlockTemplates\BlockInterface;
|
use Automattic\WooCommerce\Admin\BlockTemplates\BlockInterface;
|
||||||
use Automattic\WooCommerce\Admin\Features\ProductBlockEditor\ProductTemplates\GroupInterface;
|
use Automattic\WooCommerce\Admin\Features\ProductBlockEditor\ProductTemplates\GroupInterface;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* DownloadableProductTrait
|
* DownloadableProductTrait
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates;
|
namespace Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates;
|
||||||
|
|
||||||
use Automattic\WooCommerce\Admin\Features\Features;
|
use Automattic\WooCommerce\Admin\Features\Features;
|
||||||
use Automattic\WooCommerce\Admin\Features\ProductBlockEditor\ProductTemplates\GroupInterface;
|
use Automattic\WooCommerce\Admin\Features\ProductBlockEditor\ProductTemplates\GroupInterface;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* WooCommerce Product Group Block class.
|
* WooCommerce Product Group Block class.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates;
|
namespace Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates;
|
||||||
|
|
||||||
use Automattic\WooCommerce\Admin\BlockTemplates\BlockTemplateInterface;
|
use Automattic\WooCommerce\Admin\BlockTemplates\BlockTemplateInterface;
|
||||||
use Automattic\WooCommerce\Admin\BlockTemplates\ContainerInterface;
|
use Automattic\WooCommerce\Admin\BlockTemplates\ContainerInterface;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* WooCommerce Product Block class.
|
* WooCommerce Product Block class.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates;
|
namespace Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates;
|
||||||
|
|
||||||
use Automattic\WooCommerce\Admin\BlockTemplates\BlockInterface;
|
use Automattic\WooCommerce\Admin\BlockTemplates\BlockInterface;
|
||||||
use Automattic\WooCommerce\Admin\BlockTemplates\ContainerInterface;
|
use Automattic\WooCommerce\Admin\BlockTemplates\ContainerInterface;
|
||||||
|
|
|
@ -3,11 +3,10 @@
|
||||||
* ProductVariationTemplate
|
* ProductVariationTemplate
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates;
|
namespace Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates;
|
||||||
|
|
||||||
use Automattic\WooCommerce\Admin\Features\Features;
|
use Automattic\WooCommerce\Admin\Features\Features;
|
||||||
use Automattic\WooCommerce\Admin\Features\ProductBlockEditor\ProductTemplates\ProductFormTemplateInterface;
|
use Automattic\WooCommerce\Admin\Features\ProductBlockEditor\ProductTemplates\ProductFormTemplateInterface;
|
||||||
use Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates\DownloadableProductTrait;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Product Variation Template.
|
* Product Variation Template.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* WooCommerce Section Block class.
|
* WooCommerce Section Block class.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates;
|
namespace Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates;
|
||||||
|
|
||||||
use Automattic\WooCommerce\Admin\BlockTemplates\BlockTemplateInterface;
|
use Automattic\WooCommerce\Admin\BlockTemplates\BlockTemplateInterface;
|
||||||
use Automattic\WooCommerce\Admin\BlockTemplates\ContainerInterface;
|
use Automattic\WooCommerce\Admin\BlockTemplates\ContainerInterface;
|
||||||
|
|
|
@ -3,11 +3,10 @@
|
||||||
* SimpleProductTemplate
|
* SimpleProductTemplate
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates;
|
namespace Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates;
|
||||||
|
|
||||||
use Automattic\WooCommerce\Admin\Features\Features;
|
use Automattic\WooCommerce\Admin\Features\Features;
|
||||||
use Automattic\WooCommerce\Admin\Features\ProductBlockEditor\ProductTemplates\ProductFormTemplateInterface;
|
use Automattic\WooCommerce\Admin\Features\ProductBlockEditor\ProductTemplates\ProductFormTemplateInterface;
|
||||||
use Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates\DownloadableProductTrait;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple Product Template.
|
* Simple Product Template.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* WooCommerce Subsection Block class.
|
* WooCommerce Subsection Block class.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates;
|
namespace Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates;
|
||||||
|
|
||||||
use Automattic\WooCommerce\Admin\BlockTemplates\BlockTemplateInterface;
|
use Automattic\WooCommerce\Admin\BlockTemplates\BlockTemplateInterface;
|
||||||
use Automattic\WooCommerce\Admin\BlockTemplates\ContainerInterface;
|
use Automattic\WooCommerce\Admin\BlockTemplates\ContainerInterface;
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
use Automattic\WooCommerce\LayoutTemplates\LayoutTemplateRegistry;
|
use Automattic\WooCommerce\LayoutTemplates\LayoutTemplateRegistry;
|
||||||
|
|
||||||
use Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates\SimpleProductTemplate;
|
use Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates\SimpleProductTemplate;
|
||||||
use Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates\ProductVariationTemplate;
|
use Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates\ProductVariationTemplate;
|
||||||
|
|
||||||
use Automattic\WooCommerce\Tests\LayoutTemplates\TestLayoutTemplate;
|
use Automattic\WooCommerce\Tests\LayoutTemplates\TestLayoutTemplate;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace Automattic\WooCommerce\Tests\Admin\ProductBlockEditor\ProductTemplates;
|
namespace Automattic\WooCommerce\Tests\Admin\ProductBlockEditor\ProductTemplates;
|
||||||
|
|
||||||
use Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates\AbstractProductFormTemplate;
|
use Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates\AbstractProductFormTemplate;
|
||||||
use Automattic\WooCommerce\Admin\Features\ProductBlockEditor\ProductTemplates\ProductFormTemplateInterface;
|
use Automattic\WooCommerce\Admin\Features\ProductBlockEditor\ProductTemplates\ProductFormTemplateInterface;
|
||||||
|
|
||||||
class CustomProductFormTemplate extends AbstractProductFormTemplate implements ProductFormTemplateInterface {
|
class CustomProductFormTemplate extends AbstractProductFormTemplate implements ProductFormTemplateInterface {
|
||||||
|
|
|
@ -4,8 +4,8 @@ namespace Automattic\WooCommerce\Tests\LayoutTemplates;
|
||||||
|
|
||||||
use Automattic\WooCommerce\LayoutTemplates\LayoutTemplateRegistry;
|
use Automattic\WooCommerce\LayoutTemplates\LayoutTemplateRegistry;
|
||||||
|
|
||||||
use Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates\SimpleProductTemplate;
|
use Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates\SimpleProductTemplate;
|
||||||
use Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates\ProductVariationTemplate;
|
use Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates\ProductVariationTemplate;
|
||||||
|
|
||||||
use WC_Unit_Test_Case;
|
use WC_Unit_Test_Case;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue