woocommerce / woocommerce-gateway-stripe

The official Stripe Payment Gateway for WooCommerce
https://wordpress.org/plugins/woocommerce-gateway-stripe/
236 stars 206 forks source link

Pre-fill user info for Link in the Payment Element (classic checkout) #3621

Closed annemirasol closed 1 day ago

annemirasol commented 4 days ago

Completes #3619

Changes proposed in this Pull Request:

Similar to #3620 for block checkout, we will pre-fill the email address and phone number fields in the classic (shortcode) checkout, to improve the user experience for Link in the Payment Element.

Testing instructions

  1. Enable Link as a payment method.

Unregistered user

  1. As a shopper, add a product to cart and go to classic/shortcode checkout.
  2. Enter your test email address, one that is NOT registered with Link.
  3. Complete shipping/billing details and enter a phone number.
  4. In the Payment Element, after filling in the card number, expiry and CVC, you should see the option Save your info for secure 1-click checkout with Link appear.
  5. Check the checkbox. You should see pre-filled email address and phone number fields. See Screenshot 1.
  6. Verify that you can complete the purchase without any problem.

Screenshot 1: Notice how the email address and phone number are pre-filled.

Screenshot 2024-11-22 at 11 10 43 AM

Registered user

  1. As a shopper, add a product to cart and go to classic/shortcode checkout.
  2. Enter your test email address, one that is registered with Link.
    • You can use the now-registered email address from the previous test.
  3. In the Payment Element, notice your Link-registered email address with challenge code boxes. Since we are in test mode, you may enter any 5-digit number to authenticate. See Screensot 2.
  4. You should now see your saved credit cards. See Screenshot 3.
  5. Verify that you can complete the purchase without any problem.

Screenshot 2: Notice how the email address is pre-filled.

Screenshot 2024-11-22 at 11 13 19 AM

Screenshot 3: After authentication via challenge code, user's saved credit cards are available for use.

Screenshot 2024-11-22 at 11 14 00 AM

Post merge