Payment Gateways not Registered
-
Since sometime around the release of version 8.1.0, this plugin no longer works on a site that I manage. The payment gateways do not appear at all on the Settings -> Payments page and the settings pages (within the plugin links) are entirely blank.
After digging through the plugin’s source code and testing the execution of hooks, it appears that
WC_Braintree::load_gatewaysis never called after registered withinSV_WC_Payment_Gateway_Plugin::add_hookswithadd_filter( 'woocommerce_payment_gateways', array( $this, 'load_gateways' ) );. This may be due to the fact that theWC_Braintreeclass is initialized by thewc_braintreefunction during thewoocommerce_initaction which may occur after thewoocommerce_payment_gatewaysfilter is called (I haven’t confirmed this).What I do know is that the following code allows the payment gateways to be registered and resumes full functionality of the plugin (as far as I can tell).
add_filter('woocommerce_payment_gateways', function ($gateways) { return WC_Braintree::instance()->load_gateways($gateways); });I’ve provided a heavily edited copy of the status report as there are a number of configuration settings which I prefer not to disclose and that I don’t believe are relevant to this issue.
WordPress Environment WC Version: 8.8.3 REST API Version: ✔ 8.8.3 Action Scheduler Version: ✔ 3.7.4 Log Directory Writable: ✔ WP Version: 6.5.2 Language: en_US Server Info: Apache PHP Version: 8.2.18 cURL Version: 7.61.1 SUHOSIN Installed: – Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ Database WC Database Version: 8.8.3 Secure connection (HTTPS): ✔ Hide errors from visitors: ✔ Active Plugins (...) Braintree for WooCommerce Payment Gateway: by WooCommerce – 3.1.5 WooCommerce: by Automattic – 8.8.3
The topic ‘Payment Gateways not Registered’ is closed to new replies.