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

Improve payment method logo visibility with dynamic dark/light variants #3836

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

malithsen
Copy link
Contributor

Changes proposed in this Pull Request:

This PR improves the visibility of payment method logos in the checkout payment method selection area by:

  1. Adding dark variants of payment method logos where available (Affirm and Afterpay)
  2. Switching the logo to the dark variant when the detected background is dark.
  3. Replaced the "Credit/Debit card" to use a more generic logo (sourced from WooPayments)
  4. Switched AfterPay and Klarna logos (sourced from WooPayments)
  5. Use the same logos in Block and Classic checkout. Currently, Classic checkout uses the svgs from assets/images while Blocks checkout and Admin area uses svgs from payment-method-icons. With this PR, checkout pages use the SVGs from assets/images. Admin area continues to use the images from payment-method-images.

Testing instructions

  1. Enable Affirm and Afterpay payment methods in your Stripe settings
  2. Test the checkout page with different background colors:
    • Use a light theme/background
    • Use a dark theme/background
    • Test with custom background colors
  3. Verify that:
    • Logos are clearly visible against all backgrounds
    • Affirm and AfterPay logos change depending on the background.
    • Other payment method logos remain unchanged.
    • Payment method logos used in the admin area remain unchanged.

Light background

Before After
CleanShot 2025-02-03 at 14 15 20 CleanShot 2025-02-03 at 14 13 39

Dark background

Before After
CleanShot 2025-02-03 at 13 15 01 CleanShot 2025-02-03 at 13 35 02

  • 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant