Skip to content

Commit d98278b

Browse files
authored
Check payment method before updating payment method title (#2410)
* Check payment method before updating payment method title * Add changelog entry
1 parent 4b49010 commit d98278b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog.txt

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

33
= 6.6.0 - 2022-xx-xx =
44
* Fix - Fix "Pending" text instead of numeric amount on Payment Request button on iOS.
5+
* Fix - Check payment method before updating payment method title.
56

67
= 6.5.1 - 2022-08-01 =
78
* Fix - Stripe Link missing styles and logo for email trigger button.

includes/payment-methods/class-wc-stripe-payment-request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ public function get_normalized_postal_code( $postcode, $country ) {
522522
* @return void
523523
*/
524524
public function add_order_meta( $order_id, $posted_data ) {
525-
if ( empty( $_POST['payment_request_type'] ) ) {
525+
if ( empty( $_POST['payment_request_type'] ) || ! isset( $_POST['payment_method'] ) || 'stripe' !== $_POST['payment_method'] ) {
526526
return;
527527
}
528528

0 commit comments

Comments
 (0)