Open sbolinger-godaddy opened 6 months ago
@sbolinger-godaddy Implementing the solution shouldn't be too much of an issue. I've added this into the next release's milestone and it should be resolved in the next release. Sorry about any inconveniences this may have caused.
@kidunot89 Thanks so much Geoff!
Describe the bug
When the plugin is installed via composer, this HPOS compatibility function throws errors in WooCommerce.
FeaturesUtil::declare_compatibility: /wp-content/plugins/enhanced-checkout-woocommerce/vendor/wp-graphql/wp-graphql-woocommerce/wp-graphql-woocommerce.php is not a known WordPress plugin.
That second parameter: FILE typically corresponds to a path like wp-content/plugins/wp-graphql-woocommerce/wpgraphql-woocommerce.php -- as in, a path for a normal WordPress plugin.
But when it's installed as a composer dependency, it's actually going to be: wp-content/plugins/enhanced-checkout-woocommerce/vendor/wp-graphql/wp-graphql-woocommerce/wpgraphql-woocommerce.php (inside /vendor/ and nested quite deep!)
The problem is that inside that WooCommerce function that they're using (FeaturesUtil::declare_compatibility()) WooCommerce validates that the provided file path is inside the list of currently active plugins that WordPress recognizes (everything ONLY inside wp-content/plugins one layer deep).
In this case, WpGraphQL doesn't meet that criteria. That's when WooCommerce automatically logs the error.
Proposed Solution
Remove this compatibility function. When installed via composer, this should be the job of the parent plugin.
To Reproduce
Steps to reproduce the behavior:
Thanks!