Skip to content

Commit b1421eb

Browse files
authored
Allow iDEAL tokens saving when SEPA is disabled (#3675)
* Allow iDEAL tokens saving when SEPA is disabled * Revert unnecessary changes * Changelog and readme entries
1 parent a1147b5 commit b1421eb

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*** Changelog ***
22

33
= 9.1.0 - xxxx-xx-xx =
4+
* Fix - Allow the saving of iDEAL tokens when SEPA is disabled.
45
* Fix - Fixes the incompatibility notice in editor due missing style property when instantiating Stripe payment methods.
56
* Dev - Updates the GitHub caching action (`actions/cache`) to v4 due deprecation.
67
* Fix - Don't update canceled order status to on-hold when a dispute is opened.

includes/class-wc-stripe-payment-tokens.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,11 @@ public function woocommerce_get_customer_upe_payment_tokens( $tokens, $user_id,
301301
}
302302
}
303303

304+
// Add SEPA if it is disabled and iDEAL is enabled. iDEAL tokens are saved as SEPA tokens.
305+
if ( ! $gateway->payment_methods[ WC_Stripe_UPE_Payment_Method_Sepa::STRIPE_ID ]->is_enabled() && $gateway->payment_methods[ WC_Stripe_UPE_Payment_Method_Ideal::STRIPE_ID ]->is_enabled() ) {
306+
$payment_methods[] = $customer->get_payment_methods( WC_Stripe_UPE_Payment_Method_Sepa::STRIPE_ID );
307+
}
308+
304309
$payment_methods = array_merge( ...$payment_methods );
305310

306311
// Prevent unnecessary recursion, WC_Payment_Token::save() ends up calling 'woocommerce_get_customer_payment_tokens' in some cases.

readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o
111111
== Changelog ==
112112

113113
= 9.1.0 - xxxx-xx-xx =
114+
* Fix - Allow the saving of iDEAL tokens when SEPA is disabled.
114115
* Fix - Fixes the incompatibility notice in editor due missing style property when instantiating Stripe payment methods.
115116
* Dev - Updates the GitHub caching action (`actions/cache`) to v4 due deprecation.
116117
* Fix - Don't update canceled order status to on-hold when a dispute is opened.

0 commit comments

Comments
 (0)