WooCommerce icon indicating copy to clipboard operation
WooCommerce copied to clipboard

WooCommerce Subscriptions on-hold status update on chargeback

Open pepijn-vanvlaanderen opened this issue 4 years ago • 0 comments

When a chargeback is triggered, Mollie fires the webhook to update the status to "on-hold". Since in this case a subscription is already on the status "on-hold" (because it is pending payment), it results in an 500 error on the webhook call:

2020-12-30T04:24:43+00:00 CRITICAL Uncaught Exception: Niet in staat om de status van abonnement te veranderen naar "on-hold". in /path-to-plugins/woocommerce-subscriptions/includes/class-wc-subscription.php:422 Stack trace: #0 /path-to-plugins/mollie-payments-for-woocommerce/src/Mollie/WC/Gateway/Abstract.php(737): WC_Subscription->update_status('on-hold', 'SEPA-incasso pa...') #1 /path-to-plugins/mollie-payments-for-woocommerce/src/Mollie/WC/Gateway/Abstract.php(1282): Mollie_WC_Gateway_Abstract->updateOrderStatus(Object(WC_Subscription), 'on-hold', 'SEPA-incasso pa...', false) #2 /path-to-plugins/mollie-payments-for-woocommerce/src/Mollie/WC/Gateway/Abstract.php(895): Mollie_WC_Gateway_Abstract->processChargebacks(Object(Automattic\WooCommerce\Admin\Overrides\Order), Object(Mollie\Api\Resources\Payment)) #3 /path-to-wp/wp-includes/class-wp-hook.php(287): Mollie_WC_Gateway_Abstract->onWebhookAction('') #4 /path-to-plugins/woocommerce-subscriptions/includes/class-wc-subscription.php op de lijn 422

pepijn-vanvlaanderen avatar Dec 30 '20 11:12 pepijn-vanvlaanderen