Merge pull request #32966 from woocommerce/fix/32962_fatal_error_wc_admin_conflict
Add FeaturePlugin facade under the Admin namespace to avoid conflict WCA conflict
This commit is contained in:
commit
ed2adee551
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Fix issue where FeaturePlugin class caused a conflict with older WooCommerce Admin versions. #32966
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
/**
|
||||
* WooCommerce Admin: Feature plugin main class.
|
||||
*/
|
||||
|
||||
namespace Automattic\WooCommerce\Admin;
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
/**
|
||||
* Feature plugin main class.
|
||||
*
|
||||
* @deprecated since 6.4.0
|
||||
*/
|
||||
class FeaturePlugin extends DeprecatedClassFacade {
|
||||
/**
|
||||
* The name of the non-deprecated class that this facade covers.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $facade_over_classname = 'Automattic\WooCommerce\Internal\Admin\FeaturePlugin';
|
||||
|
||||
/**
|
||||
* The version that this class was deprecated in.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $deprecated_in_version = '6.4.0';
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function __construct() {}
|
||||
|
||||
/**
|
||||
* Get class instance.
|
||||
*
|
||||
* @return object Instance.
|
||||
*/
|
||||
final public static function instance() {
|
||||
return new static();
|
||||
}
|
||||
|
||||
/**
|
||||
* Init the feature plugin, only if we can detect both Gutenberg and WooCommerce.
|
||||
*
|
||||
* @deprecated 6.4.0
|
||||
*/
|
||||
public function init() {}
|
||||
}
|
Loading…
Reference in New Issue