Skip to content

Conversation

@laurelfulford
Copy link
Contributor

All Submissions:

Changes proposed in this Pull Request:

This PR adds link to our array of express payment processors so successful transaction pass the 'is_modal_checkout()` check and show the Thank You message.

See NPPM-2437

How to test the changes in this Pull Request:

  1. Set up a test site running Stripe Gateway in Test Mode.
  2. Under WooCommerce > Settings > Payments > Stripe, enable Link as an express payment form.
  3. Set up a checkout button with a product to test -- you want to be able to run repeated transaction as the same person, so make sure it's not a restricted subscription.
  4. In an incognito window, make a purchase. Fill in the usual 4242 4242 4242 4242 number. When the Link information panel opens, enter (201) 555-0123 as the phone number. If you're not purchasing a subscription product, make sure to save your payment information:
CleanShot 2025-12-08 at 14 08 14
  1. Complete the purchase.
  2. Refresh the page and start another transaction as the same user, but this time pick Link as the payment option.
  3. You'll get prompted to enter a code - enter 000 000:
CleanShot 2025-12-08 at 14 10 27
  1. Note that the transaction appears to stick - if you unhide the spinner/loader in the modal you'll see the non-Newspack normal success message is displaying:
CleanShot 2025-12-08 at 14 12 14
  1. Apply this PR.
  2. Rerun steps 4 through 7 - you can use the same incognito window so your test Link information is already saved.
  3. Confirm you get the normal Thank You message.

Bonus test - make sure Link still throws failed transaction errors when needed:

  1. Start a new incognito window and repeat the steps starting at 4, but using the credit card number 4000 0000 0000 0341 - this is the number from Stripe that will let you add it without validating it, but will cause transactions to fail.
  2. Add the phone number (201) 555-0123 again, and save your payment information if needed.
  3. Note you get an error about the payment not going through.
  4. Refresh the page and start one more new transaction and this time, pick Link, which should have saved your bad number. When prompted, enter the code 000 000 again. You may also be added to renter your CBC code, etc.
  5. Confirm you get a payment failed message:
CleanShot 2025-12-08 at 14 23 06

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Copy link
Member

@miguelpeixe miguelpeixe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works!

@laurelfulford
Copy link
Contributor Author

Thanks @miguelpeixe! 🙌

@laurelfulford laurelfulford merged commit fdd6fd5 into trunk Dec 16, 2025
8 checks passed
@laurelfulford laurelfulford deleted the fix/link-success-message branch December 16, 2025 16:27
@github-actions
Copy link

Hey @laurelfulford, good job getting this PR merged! 🎉

Now, the needs-changelog label has been added to it.

Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label.

If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label.

Thank you! ❤️

matticbot pushed a commit that referenced this pull request Jan 9, 2026
# [4.21.0-alpha.1](v4.20.1...v4.21.0-alpha.1) (2026-01-09)

### Bug Fixes

* add Link to express payment array ([#2266](#2266)) ([fdd6fd5](fdd6fd5))
* add space to donate block label in editor ([#2270](#2270)) ([d18cf42](d18cf42))

### Features

* improve express checkout handling by surfacing errors ([#2273](#2273)) ([1d98b9b](1d98b9b))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 4.21.0-alpha.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants