From 48de685c454df0b9e800c71b0a41df9e4a5c1b53 Mon Sep 17 00:00:00 2001 From: Peter Fabian Date: Wed, 12 Oct 2022 10:17:54 +0200 Subject: [PATCH] Replaced __FILE__ in the compat declaration snippet, it can cause problems on some hostings (eg with symlinks). --- High-Performance-Order-Storage-Upgrade-Recipe-Book.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/High-Performance-Order-Storage-Upgrade-Recipe-Book.md b/High-Performance-Order-Storage-Upgrade-Recipe-Book.md index 304b16b..cf3bae6 100644 --- a/High-Performance-Order-Storage-Upgrade-Recipe-Book.md +++ b/High-Performance-Order-Storage-Upgrade-Recipe-Book.md @@ -197,7 +197,7 @@ Once you examined the extension's code, you can declare whether it's compatible if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) { add_action('before_woocommerce_init', function() { - \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('custom_order_tables', __FILE__, true); + \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('custom_order_tables', 'my-plugin-name/my-plugin-name.php', true); }); } @@ -208,7 +208,7 @@ If you know your code doesn't support HPOS, you should declare incompatibility i if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) { add_action('before_woocommerce_init', function() { - \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('custom_order_tables', __FILE__, false); + \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility('custom_order_tables', 'my-plugin-name/my-plugin-name.php', false); }); }