Skip to content

Commit

Permalink
fix: Bypasses Woo declare_compatiblilty call if not in plugin directory
Browse files Browse the repository at this point in the history
  • Loading branch information
kidunot89 committed Feb 24, 2025
1 parent 36e79d3 commit 9c7b87c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wp-graphql-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ function init_auth_router() {
add_action(
'before_woocommerce_init',
static function () {
if ( get_plugin_directory() !== WP_PLUGIN_DIR . '/wp-graphql-woocommerce/' ) {
return;
}

if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
}
Expand Down

0 comments on commit 9c7b87c

Please sign in to comment.