Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add title, description and gatewayId for express payment methods #3415

Merged
merged 2 commits into from
Sep 4, 2024

Conversation

alexflorisca
Copy link
Member

This PR ads title, description and gatewayId props to express payment methods to be displayed in the editor. These are used to display the available express payment methods to a merchant, once they click on the express checkout block.

This is parallel work with woocommerce/woocommerce#50791 and the feature/express-payment-improvements branch should be used to test. However this should also work with the current release of WC, and can be safely merged and released before the work in Core is released.

If these props are no provided, the name is used instead and the list will look like this:

Screenshot 2024-09-04 at 11 21 33

After this PR, the list should look like this:

Screenshot 2024-09-04 at 11 20 13

The link for the Stripe payment method should take you to the Stripe settings.

Testing instructions

  1. Visit the checkout page in the editor
  2. Click on the express payment block
  3. See on the right hand sidebar that the list of Express Payment methods shows, and that the Stripe method have a title, description and the link goes to the Stripe settings page.
  4. Smoke test with current WC version and make sure the express method still works as expected.

  • Covered with tests (or have a good reason not to test in description ☝️)
  • Added changelog entry in both changelog.txt and readme.txt (or does not apply)
  • Tested on mobile (or does not apply)

Post merge

@alexflorisca alexflorisca added the type: enhancement The issue is a request for an enhancement / Feature Request label Sep 4, 2024
@wjrosa wjrosa requested review from wjrosa and removed request for diegocurbelo September 4, 2024 13:18
Copy link
Contributor

@wjrosa wjrosa left a comment

Choose a reason for hiding this comment

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

Code is good, and it works as expected!

  1. See on the right hand sidebar that the list of Express Payment methods shows, and that the Stripe method have a title, description and the link goes to the Stripe settings page.

Screenshot 2024-09-04 at 11 55 09

It does send me to the Stripe settings page 👍 .

  1. Smoke test with current WC version and make sure the express method still works as expected.

I was able to process a payment with it:
https://github.com/user-attachments/assets/9d2094b0-e7ea-4cdb-9840-db48f09549dd
https://github.com/user-attachments/assets/6a833110-de5e-44f4-b1ff-ce89e07ebda3

@alexflorisca alexflorisca merged commit 9b93dae into develop Sep 4, 2024
35 checks passed
@alexflorisca alexflorisca deleted the update/add-title-description-gateway-id branch September 4, 2024 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement The issue is a request for an enhancement / Feature Request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants