Replaced __FILE__ in the compat declaration snippet, it can cause problems on some hostings (eg with symlinks).

Peter Fabian 2022-10-12 10:17:54 +02:00
parent 92a640bbc7
commit 48de685c45
1 changed files with 2 additions and 2 deletions

@ -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);
});
}