Skip to content

Commit 1d0ae23

Browse files
malithsendaledupreez
authored andcommitted
Fix setup intent webhook fatal (#4518)
* Pass the required order param to the hook * Add changelogs * Remove unused hook calls to add on-hold status * Re-introduce public methods to add on_hold status * Re-introduce removed filters * Update changelog.txt Co-authored-by: Diego Curbelo <[email protected]> Cherry-picked from fe5a047
1 parent 2e31df6 commit 1d0ae23

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Tweak - Check for checkout validation error before creating a payment method in Stripe
66
* Fix - Prevent multiple save appearance AJAX calls on Block Checkout
77
* Fix - Fix required field error message and PHP warning for custom checkout fields that don't have a label
8+
* Fix - Fix fatal when processing setup intents for free subscriptions via webhooks
89

910
= 9.7.0 - 2025-07-21 =
1011
* Update - Removes BNPL payment methods (Klarna and Affirm) when other official plugins are active

includes/class-wc-stripe-webhook-handler.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,10 +1169,12 @@ public function process_setup_intent( $notification ) {
11691169
* @since 9.7.0
11701170
*
11711171
* @param array $allowed_payment_processing_statuses The allowed payment processing statuses.
1172+
* @param WC_Order $order The order object.
11721173
*/
11731174
$allowed_payment_processing_statuses = apply_filters(
11741175
'wc_stripe_allowed_payment_processing_statuses',
11751176
$allowed_payment_processing_statuses,
1177+
$order
11761178
);
11771179

11781180
if ( ! $order->has_status( $allowed_payment_processing_statuses ) ) {

readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o
115115
* Tweak - Check for checkout validation error before creating a payment method in Stripe
116116
* Fix - Prevent multiple save appearance AJAX calls on Block Checkout
117117
* Fix - Fix required field error message and PHP warning for custom checkout fields that don't have a label
118+
* Fix - Fix fatal when processing Boleto setup intents via webhooks
118119

119120
= 9.7.0 - 2025-07-21 =
120121

0 commit comments

Comments
 (0)