From a882f437171fef79ea306f0f7b1d3b5ea975469d Mon Sep 17 00:00:00 2001 From: Nurul Umbhiya Date: Tue, 28 Nov 2023 20:27:55 +0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(dokan.php):=20rename=20add?= =?UTF-8?q?=5Fhpos=5Fsupport()=20to=20declare=5Fwoocommerce=5Ffeature=5Fco?= =?UTF-8?q?mpatibility()=20for=20better=20clarity=20and=20semantics=20?= =?UTF-8?q?=E2=9C=A8=20feat(dokan.php):=20add=20declaration=20of=20compati?= =?UTF-8?q?bility=20for=20'cart=5Fcheckout=5Fblocks'=20feature=20in=20WooC?= =?UTF-8?q?ommerce=20to=20improve=20compatibility=20with=20newer=20version?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dokan.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dokan.php b/dokan.php index 1c0704b39f..120c5713d2 100755 --- a/dokan.php +++ b/dokan.php @@ -111,7 +111,7 @@ private function __construct() { register_activation_hook( __FILE__, [ $this, 'activate' ] ); register_deactivation_hook( __FILE__, [ $this, 'deactivate' ] ); - add_action( 'before_woocommerce_init', [ $this, 'add_hpos_support' ] ); + add_action( 'before_woocommerce_init', [ $this, 'declare_woocommerce_feature_compatibility' ] ); add_action( 'woocommerce_loaded', [ $this, 'init_plugin' ] ); add_action( 'woocommerce_flush_rewrite_rules', [ $this, 'flush_rewrite_rules' ] ); @@ -287,9 +287,10 @@ private function define( $name, $value ) { * * @return void */ - public function add_hpos_support() { + public function declare_woocommerce_feature_compatibility() { if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) { \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); + \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'cart_checkout_blocks', __FILE__, false ); } }