Skip to content

Release testing instructions for WC Payments 3.4.0

Anurag Bhandari edited this page Dec 6, 2021 · 7 revisions

Allow UI customizations below checkout payment fields, using WCPay

Expected outcome

Below the checkout payment fields, there should be some green text that reads: "Thank you for your purchase".

Testing instructions

  1. From the admin perspective (wp-admin), click on the WCPay Dev menu item.
  2. Make sure Enable UPE checkout is not checked.
  3. Go to Snippets (requires Code Snippets plugin) and click Add New.
  4. Enter any title and paste the following code snippet in the Code section:
add_action('wcpay_payment_fields_wcpay', function ($id) {
  echo "<div style='color: green;'>Thank you for your purchase</div>";
});
  1. Click Save Changes.
  2. From the customer perspective, go to the Shop, add some product to your cart, and go to Checkout.
  3. Observe the Expected outcome.

Allow UI customizations below checkout payment fields, using UPE

Expected outcome

Below the checkout payment fields, there should be some purple text that reads: "Thank you for your purchase".

Testing instructions

  1. From the admin perspective (wp-admin), click on the WCPay Dev menu item.
  2. Make sure Enable UPE checkout is checked.
  3. Go to Snippets (requires Code Snippets plugin) and click Add New.
  4. Enter any title and paste the following code snippet in the Code section:
add_action('wcpay_payment_fields_upe', function ($id) {
  echo "<div style='color: purple;'>Thank you for your purchase</div>";
});
  1. Click Save Changes.
  2. From the customer perspective, go to the Shop, add some product to your cart, and go to Checkout.
  3. Observe the Expected outcome.

Fix incorrect amounts on the payment request button for zero decimal currencies

Expected outcome

Price shown on the payment request button for zero decimal currencies like Japanese Yen should match the actual amount of the product

Testing instructions

  1. Add Japanese yen to the list of currencies in WooCommerce -> Settings -> Multi-currency
  2. Enable express checkout from Payments -> Settings -> Enable express checkouts
  3. As a customer, under My Account > Account Details, switch the currency to JPY and save. (Or use currency switcher widget)
  4. Go to a product page
  5. Click the payment request button
  6. Ensure that the prices shown matches the correct amount for the product

Show the prices in the correct currency when using the "All Products" block

Expected outcome

The currency of the products in the All Products block should be the same as the store's currency.

Testing instructions

  • Have the default settings for WooCommerce -> MultiCurrency (Automatically switch customers to their local currency)
  • Set your WooCommerce currency to a different currency than your country's (for example, if you're in Germany, set it to $)
  • Add your country's currency to the MultiCurrency list (for example, if you're in Germany, add )
  • Create a new page. Add the "All Products" block to that page, and publish it.
  • Visit the page (on an Incognito window).
  • Note that the currency selected in the currency switcher dropdown matches the price amounts in the products grid. For example, if visiting from Germany, everything should be displayed in €.

Add order metadata to intent before in-person/terminal payment capture

Expected outcome

Order metadata should be added to an intent while capturing a terminal payment.

Testing instructions

  • Create a new order in WooCommerce with "Cash on delivery" as the payment method.

  • Create a payment intent in Stripe Dashboard at https://dashboard.stripe.com/test/connect/accounts/<account_id>/payments/new. Make sure to have the "Capture funds later" option selected under "Manually enter card information."

  • On the intent details page https://dashboard.stripe.com/test/connect/accounts/<account_id>/payments/<intent_id>, scroll down to the "Metadata" section. Add a couple of key-value pairs, eg. customer_name = John Doe, data_from_mobile = Dummy Text. We'll need this to verify backward compatibility later.

image
  • Make a POST request to /payments/orders/<order_id>/capture_terminal_payment. Refer the docs to set up authorization correctly.
image
  • Refresh the intent details page and verify whether new metadata key-value pairs have been added:
    • The original value of customer_name should be preserved, i.e. "John Doe." It should not be the one specified in the customer name field while creating the order in step 1. (backward compatibility check)
    • data_from_mobile should still be present. (backward compatibility check)
    • More pairs should have been added by the capture_terminal_payment API, such as order_id, order_key, etc.
Clone this wiki locally