You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Bundle this plugin via composer into another plugin
Install and activate WooCommerce and your plugin
Visit WooCommerce logs to see the errors
Thanks!
The text was updated successfully, but these errors were encountered:
@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.
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!
The text was updated successfully, but these errors were encountered: