From 8199f5647127cca64e5e3a4e315a443b7699c6a7 Mon Sep 17 00:00:00 2001 From: Matt Allan Date: Mon, 13 May 2024 15:32:29 +1000 Subject: [PATCH] Save payment method on subscription when setting amazon pay payment meta --- .../class-wc-gateway-amazon-payments-advanced-subscriptions.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/class-wc-gateway-amazon-payments-advanced-subscriptions.php b/includes/class-wc-gateway-amazon-payments-advanced-subscriptions.php index 25d7ea85..b5624d97 100644 --- a/includes/class-wc-gateway-amazon-payments-advanced-subscriptions.php +++ b/includes/class-wc-gateway-amazon-payments-advanced-subscriptions.php @@ -474,6 +474,7 @@ public function copy_meta_to_sub( $order, $response ) { $subscription->update_meta_data( $key, $value ); } + $subscription->set_payment_method( wc_apa()->get_gateway()->id ); $subscription->save(); } }