Hello Roots and Bedrock community!
I recently finished re-building an e-commerce website for a client using Bedrock 1.13.0, Sage 9.0.9, and Woocommerce 4.1.
For the Braintree plugin I opted for the hosted fields option where the form appears on the checkout page.
I contacted support and it turns out that the necessary plugin scripts are not enqueued correctly in the theme.
After some digging into the plugin code, I verified that this script is the only one that does not depend on the WC Class. Every other script enqueue or register looks for a function of Woocommerce’s WC Class.
So I guess there is an issue of Braintree Plugin not recognizing the Woocommerce installation.
Things I have tried/done:
- Disabling all other plugins except Woocoomerce and Woo Payment Gateway
- Switching to a default Wordpress theme
- var_dumping in various locations in the plugin’s code to verify that in its environment indeed there isn’t a valid WC() reference.
I am not arguing that this is a Bedrock/Sage issue, but I am desperate and I thought of giving it a shot and writing my issue here.
Thank you all for your help.