Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*** Changelog ***

= 9.9.0 - xxxx-xx-xx =
* Dev - Replaces some payment method instantiation logic for the Optimized Checkout with calls to the `get_payment_method_instance` method
* Fix - Removes the credit card payment method requirement for the Optimized Checkout feature
* Fix - Payment method test instructions not showing up for the Optimized Checkout payment element
* Add - Includes a new notice to highlight the Optimized Checkout feature above the payment methods list in the Stripe settings page
Expand Down
14 changes: 2 additions & 12 deletions includes/payment-methods/class-wc-stripe-upe-payment-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -1060,12 +1060,7 @@ private function process_payment_with_payment_method( int $order_id ) {
$response_args = [];

if ( $this->oc_enabled && isset( $payment_method_details->type ) ) {
foreach ( self::UPE_AVAILABLE_METHODS as $payment_method_class ) {
$payment_method = new $payment_method_class();
if ( $payment_method->get_id() === $payment_method_details->type ) {
$upe_payment_method = $payment_method;
}
}
$upe_payment_method = self::get_payment_method_instance( $payment_method_details->type );
}

// Make sure that we attach the payment method and the customer ID to the order meta data.
Expand Down Expand Up @@ -2226,12 +2221,7 @@ public function create_token_from_setup_intent( $setup_intent_id, $user ) {
if ( $this->oc_enabled ) {
$payment_method_type = $payment_method_details['type'] ?? $payment_method_details->type ?? null;
if ( ! empty( $payment_method_type ) ) {
foreach ( self::UPE_AVAILABLE_METHODS as $payment_method_class ) {
$payment_method_instance = new $payment_method_class();
if ( $payment_method_instance->get_id() === $payment_method_type ) {
$payment_method = $payment_method_instance;
}
}
$payment_method = self::get_payment_method_instance( $payment_method_type );
}
} else {
$payment_method = $this->payment_methods[ $payment_method_type ] ?? null;
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o
== Changelog ==

= 9.9.0 - xxxx-xx-xx =
* Dev - Replaces some payment method instantiation logic for the Optimized Checkout with calls to the `get_payment_method_instance` method
* Fix - Removes the credit card payment method requirement for the Optimized Checkout feature
* Fix - Payment method test instructions not showing up for the Optimized Checkout payment element
* Add - Includes a new notice to highlight the Optimized Checkout feature above the payment methods list in the Stripe settings page
Expand Down
Loading