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 payment methods/gateways icon to checkout page #4666

Closed
frosso opened this issue Aug 31, 2022 · 8 comments
Closed

Add payment methods/gateways icon to checkout page #4666

frosso opened this issue Aug 31, 2022 · 8 comments
Assignees
Labels
component: checkout Issues related to Checkout priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. type: enhancement The issue is a request for an enhancement.

Comments

@frosso
Copy link
Contributor

frosso commented Aug 31, 2022

Description

There is a desire from UX to add the icons for payment methods to the checkout page.
The icon can be displayed next to the payment method's name, leveraging WooCommerce's default behavior, in order to maximize theme compatibility.

As an additional step, displaying the icon could be a preference that can be enabled on the WooCommerce Payments settings page.

Acceptance criteria

  • For each gateway displayed at checkout, its corresponding icon is displayed
  • Valid for both UPE and non-UPE behavior
  • "Popular payment methods" gateway (which corresponds to the UPE for all payment methods) does not show an icon (there would be too many, otherwise)
  • (optional) A new setting on the WC Payments settings allows to enable/disable the icon display behavior at checkout
    • The display of the icon is disabled by default for old installations, to increase compatibility
    • The display of the icon is enabled by default for new installations

Designs

Screen Shot 2022-08-31 at 9 05 47 AM

Dev notes

The WC_Payment_Gateway has a $icon public member (and a get_icon() public method) that can be leveraged to display the gateway's icon on the checkout page.

Additional context

paJDYF-58k-p2#comment-13580

@frosso frosso added type: enhancement The issue is a request for an enhancement. priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. component: checkout Issues related to Checkout labels Aug 31, 2022
@harriswong
Copy link
Contributor

This also needs to apply to the multiple UPE project.

@rogermattic
Copy link

Hey @frosso !
Just adding this Figma link here for the reference as it contains all the payment method icons assets we have.

@bborman22 bborman22 self-assigned this Oct 6, 2022
@bborman22
Copy link
Contributor

I just wanted to clarify something on this issue in case I'm missing some additional context coming in a bit late. This request to add icons is only relevant to multiple UPE set up correct? Since the only way to add these additional payment methods through WCPay is through UPE and the default UPE would have them all grouped under the "Popular payment methods" heading, the only way WCPay adds a row for these additional payment methods is through multiple UPE. Is that train of thought and conclusion correct?

@frosso
Copy link
Contributor Author

frosso commented Oct 6, 2022

@bborman22 AFAIK, the icons should be added to both the UPE payment method and to the other non-UPE payment methods.

@rogermattic @elizaan36 is this accurate?
I created this ticket as a follow up from paJDYF-58k-p2#comment-13580

@elizaan36
Copy link

hey @frosso @bborman22 👋

Yes, this would be ideal. For example, if the merchant added Afterpay and PayPal as APMs they could show up in the list with the associated icon. I don't consider it a blocker for the project but I think it would look funny if some payment methods have icons and others don't.

image

@bborman22
Copy link
Contributor

@elizaan36 Thanks for that confirmation! I was able to get the following working on my PR #4860 with some screenshots if you wanted to take a look. That was with the Storefront theme and I'd say the only major difference is the icons are all right aligned. This was just using the built in WooCommerce payment method icon and so any theme should be compatible as there isn't anything custom going on.

@elizaan36
Copy link

Nice @bborman22 ! Right aligned is even better, I was under the impression we had to keep the icon to the right of the payment method.

@bborman22
Copy link
Contributor

Great! The PR was merged into the multiple UPE branch for now, so will be getting rolled out with that feature when the time comes. I'll close this issue for now since that change has been merged into a larger move.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: checkout Issues related to Checkout priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

No branches or pull requests

6 participants