Skip to content

Commit

Permalink
update settings option for every gateway separately
Browse files Browse the repository at this point in the history
  • Loading branch information
Timur Karimov committed Mar 15, 2024
1 parent 18227bd commit 974ee32
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,11 @@ function ( $payment_method ) use ( $available_payment_methods ) {
}
}

$this->wcpay_gateway->update_option( 'upe_enabled_payment_method_ids', $payment_method_ids_to_enable );
foreach ( $payment_method_ids_to_enable as $payment_method_id ) {
$gateway = WC_Payments::get_payment_gateway_by_id( $payment_method_id );
$gateway->update_option( 'upe_enabled_payment_method_ids', $payment_method_ids_to_enable );
}

if ( $payment_method_ids_to_enable ) {
$this->request_unrequested_payment_methods( $payment_method_ids_to_enable );
}
Expand Down

0 comments on commit 974ee32

Please sign in to comment.