Cooper Dalrymple
Forum Replies Created
-
Forum: Plugins
In reply to: [Braintree for WooCommerce Payment Gateway] Payment Gateways not RegisteredHi @carolm29, just coming back around to this.
By version 8.1.0, I believe I meant WC 8.1.0? Since then, we are not up-to-date on WC 9.0.2 (+ WP 6.5.5, we have version 3.1.6 of this plugin installed), and we have still experienced issues during updates which require manual edits to this plugin to avoid errors. It usually occurs as soon as I run all plugin updates.
Here’s the most recent error which occurred today:
PHP Fatal error: Uncaught Error: Call to a member function is_available() on null in .../wp-content/plugins/woocommerce-gateway-paypal-powered-by-braintree/includes/class-wc-gateway-braintree-blocks-support.php:51
It seems that this error is similarly related in that the payment gateway is still not being loaded. The fix for this particular scenario is relatively simple. Just add the following line (#51) in WC_Gateway_Braintree_Blocks_Support::is_active:
if ( !isset( $payment_gateways[ $this->name ] ) || is_null( $payment_gateways[ $this->name ] ) ) return false;
Apologies! Got the two mixed up. Thank you.
Can confirm that I am encountering this error as well (plus some fatal errors during checkout) on one of my sites. I’ve rolled the plugin back to 1.7.3 temporarily to avoid the problem. Hopefully it will be resolved in the next update.
Forum: Plugins
In reply to: [Mailchimp for WooCommerce] Mailchimp For Woocommerce Fatal errorI encountered the same issue on one of my sites starting about last Friday, 2023-07-17. Looking through WooCommerce, it seems that they might be triggering a legacy version of the
woocommerce_update_order
action which excludes the 2nd parameter, $order. This is definitely not ideal, but the temporary fix I’ve done is to editincludes/class-mailchimp-woocommerce-service.php
to not require the $order parameter as such:public function handleOrderUpdate($order_id, $order = null) { // Default $order to null if (is_null($order)) $order = new \WC_Order($order_id); // If $order is null, create from provided $order_id mailchimp_log('handleOrderUpdate', 'order_status'); $this->handleOrderSaved($order_id, $order, true); }
I did the same for
handleOrderCreate
as well just in case. It would definitely be better to have a permanent fix for this in the next update of this plugin.