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

Display Link email in Payment Methods page #3641

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

annemirasol
Copy link
Contributor

@annemirasol annemirasol commented Dec 6, 2024

Changes proposed in this Pull Request:

  • In My Account > Payment Methods, display the Link email address for added context, the same way we display it in the Subscriptions and checkout pages.
  • Tweak the checkout page display text, for consistency with Subscriptions and Payment Methods pages.
Before After
Screenshot 2024-12-06 at 11 27 42 AM Screenshot 2024-12-06 at 11 27 56 AM

Testing instructions


  • 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

@annemirasol annemirasol marked this pull request as ready for review December 6, 2024 19:29
@annemirasol annemirasol self-assigned this Dec 6, 2024
@annemirasol annemirasol requested review from a team and diegocurbelo and removed request for a team December 6, 2024 19:53
Copy link
Contributor

@mattallan mattallan left a comment

Choose a reason for hiding this comment

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

Nice fix @annemirasol and thanks for working on this!

I've left a few comments as part of code review but I've tested this and it's working well:

image

@@ -392,7 +392,11 @@ public function get_account_saved_payment_methods_list_item( $item, $payment_tok
$item['method']['brand'] = esc_html__( 'Cash App Pay', 'woocommerce-gateway-stripe' );
break;
case WC_Stripe_Payment_Methods::LINK:
$item['method']['brand'] = esc_html__( 'Stripe Link', 'woocommerce-gateway-stripe' );
$item['method']['brand'] = sprintf(
Copy link
Contributor

Choose a reason for hiding this comment

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

This string should be escaped after the sprintf().

Even though WooCommerce escapes this in their template woocommerce/templates/myaccount/payment-methods.php we can't guarantee this for all stores/themes that override this template 😞

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call, escaping added in ec8707d

@@ -1,6 +1,7 @@
*** Changelog ***

= 9.0.0 - xxxx-xx-xx =
* Tweak - Display email address for Link saved payment methods.
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for missing this PR last week when on porter, but this changelog will needed to be moved to 9.1 🙏

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved changelog/readme entries to 9.1.0

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.

2 participants