Rename ProductTemplate namespace (#45594)

* Rename ProductTemplate namespace

* Add changelog

* Fix loader
This commit is contained in:
Fernando Marichal 2024-03-15 17:05:36 -04:00 committed by GitHub
parent 21f2a15e97
commit 184459b359
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 20 additions and 18 deletions

View File

@ -0,0 +1,4 @@
Significance: minor
Type: fix
Rename ProductTemplate namespace #45594

View File

@ -10,8 +10,8 @@ use Automattic\WooCommerce\Admin\Features\ProductBlockEditor\ProductTemplate;
use Automattic\WooCommerce\Admin\PageController;
use Automattic\WooCommerce\LayoutTemplates\LayoutTemplateRegistry;
use Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates\SimpleProductTemplate;
use Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates\ProductVariationTemplate;
use Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates\SimpleProductTemplate;
use Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates\ProductVariationTemplate;
use WP_Block_Editor_Context;

View File

@ -36,7 +36,7 @@ class Loader extends DeprecatedClassFacade {
* @deprecated since 5.0.0, use Features::is_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 );
}

View File

@ -1,6 +1,6 @@
<?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\Features\ProductBlockEditor\ProductTemplates\GroupInterface;

View File

@ -3,7 +3,7 @@
* 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\ProductBlockEditor\ProductTemplates\GroupInterface;

View File

@ -3,7 +3,7 @@
* 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\ContainerInterface;

View File

@ -3,7 +3,7 @@
* 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\ContainerInterface;

View File

@ -3,11 +3,10 @@
* 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\ProductBlockEditor\ProductTemplates\ProductFormTemplateInterface;
use Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates\DownloadableProductTrait;
/**
* Product Variation Template.

View File

@ -3,7 +3,7 @@
* 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\ContainerInterface;

View File

@ -3,11 +3,10 @@
* 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\ProductBlockEditor\ProductTemplates\ProductFormTemplateInterface;
use Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates\DownloadableProductTrait;
/**
* Simple Product Template.

View File

@ -3,7 +3,7 @@
* 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\ContainerInterface;

View File

@ -2,8 +2,8 @@
use Automattic\WooCommerce\LayoutTemplates\LayoutTemplateRegistry;
use Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates\SimpleProductTemplate;
use Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates\ProductVariationTemplate;
use Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates\SimpleProductTemplate;
use Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates\ProductVariationTemplate;
use Automattic\WooCommerce\Tests\LayoutTemplates\TestLayoutTemplate;

View File

@ -2,7 +2,7 @@
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;
class CustomProductFormTemplate extends AbstractProductFormTemplate implements ProductFormTemplateInterface {

View File

@ -4,8 +4,8 @@ namespace Automattic\WooCommerce\Tests\LayoutTemplates;
use Automattic\WooCommerce\LayoutTemplates\LayoutTemplateRegistry;
use Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates\SimpleProductTemplate;
use Automattic\WooCommerce\Internal\Admin\Features\ProductBlockEditor\ProductTemplates\ProductVariationTemplate;
use Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates\SimpleProductTemplate;
use Automattic\WooCommerce\Internal\Features\ProductBlockEditor\ProductTemplates\ProductVariationTemplate;
use WC_Unit_Test_Case;