Order pay: get the last payment error pm or src #2732
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The order pay page, after a payment failed for
authentication_required
reason, doesn't get the payment source.There is a PHP notice:
Changes proposed in this Pull Request:
Since the intent from last_payment_error only checks the source
$intent->last_payment_error->source
, the PR tries to get if it is a payment method or a source using the helperWC_Stripe_Helper::get_payment_method_from_intent
.Testing instructions
Using WooCommerce Subscriptions, make a first payment with a method having 3DS always required.
The renewal should ask for an authentication.
The link to order pay page won't display the Stripe authentication modal, and instead will show the regular checkout form.
With the PR, the checkout form is not displayed, the authentication starts just after loading the page.
changelog.txt
andreadme.txt
(or does not apply)Post merge