Skip to content

Commit d3b5d38

Browse files
authored
fix: Bypasses Woo declare_compatiblilty call if not in plugin directory (#923)
1 parent b718b87 commit d3b5d38

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

wp-graphql-woocommerce.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ function init_auth_router() {
173173
add_action(
174174
'before_woocommerce_init',
175175
static function () {
176+
if ( get_plugin_directory() !== WP_PLUGIN_DIR . '/wp-graphql-woocommerce/' ) {
177+
return;
178+
}
179+
176180
if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
177181
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
178182
}

0 commit comments

Comments
 (0)