Skip to content

Release testing instructions for WC Payments 4.2.0

Jordan Bordonado edited this page May 27, 2022 · 11 revisions

Fix empty phone and email value

Stripe does not accept empty strings for support phone and email. We don't have to send empty values for these fields.

Testing instructions

  • go to Card readers -> Receipt details section
  • set an empty value for email -> an error should be displayed and the save button disabled
  • set an empty value for phone number -> an error should be displayed and the save button disabled

Fee details to order notes for successful payments.

Testing instructions

  • Try multiple cases of generating payments: only base fee, with capped fee (SEPA Debit), with international cards, with FX, with discount, etc.
  • Ensure that formats and strings in order notes and respective transaction pages (under WP Admin > Payment > Transactions > A specific transaction) are the same.

Example:

image

Add - Show Platform checkout Specific info on success page when customer paid with Platform Checkout

Adds Platform Checkout specific info on success page when a customer pays via Platform Checkout Testing instructions With Platform Checkout

  • Checkout this PR branch on Platform Checkout site
  • Checkout this branch of WC Payments on Merchant site
  • As a shopper go to the merchant site
  • Add any product to the cart
  • Checkout using Platform Checkout
  • Make sure that the page looks like the figma file
  • A Platform Checkout logo and last 4 digits should show
  • A green notice should show on top of the page
  • As a Merchant go to the order edit page
  • Make sure the Platform Checkout logo and card last 4 shows up like bellow
Screen Shot 2022-05-05 at 11 41 59 AM

*Without Platform Checkout

  • As a shopper go to the merchant store and buy any product but checkout without Platform Checkout
  • The Platform Checkout info should not show up in the success page nor on the admin area
  • No errors should show up

Other Payment methods

  • As a shopper got to the merchant store and buy any product and checkout with other payment method. Like Boleto, OXXO, etc
  • The Platform Checkout info should not show up in the success page nor on the admin area
  • No errors should show up

Fix - Change type parameter with transaction_type for transactions url

Rename type parameter to transaction type for transaction details URL

Testing instructions

  • Go to Transactions section
  • check transaction details pages. The informations should be correctly displayed.*

Do not show country code on Platform Checkout opt-in

Prevent show country code text in the Platform Checkout opt-in phone when it's pre-filled, showing only its flag.

Testing instructions

  1. Enable Platform Checkout.
  2. On the checkout page billing address, write a phone number starting with + and country code.
  3. Opt-in to Platform Checkout.
  4. The country code will not show in the opt-in phone field.

Fix the subscriptions onboarding modal and toast

Introduces a WooCommerce version check to determine the correct plugin scope to use when registering plugins on the frontend via the registerPlugin function.

This fixes an issue where the "One more step..." modal does not appear after attempting to publish a subscription product prior to completing WCPay onboarding.

Testing instructions

Prerequisites

  • WC Subscriptions is not installed / active.
  • Fresh JN site where WCPay onboarding is not completed or enable the "Force onboarding" and "Force the plugin to act as disconnected from WCPay" settings in WCPay Dev Utils.

Then

  • Navigate to Products → Add New.
  • Add product name and switch the product type to "Simple subscription".
  • Add subscription price.
  • Click "Publish".
  • Wait for the page request to complete.
  • Observe the "One more step..." modal appears and the product remains in the draft status.
  • Click the "Finish setup" button.
  • Complete the WCPay onboarding.
  • Observe you are redirected back to the product edit page.
  • Observe the product is now published.
  • Observe the toast notification "Thank you for setting up WooCommerce Payments! We’ve published your first subscription product.".

This should work across a variety of WooCommerce versions, including:

  • WC 6.3.1
  • WC 6.4.0
  • WC 6.4.1
  • WC 6.5.0
  • WC 6.5.1

You can use the WooCommerce Beta Tester plugin to toggle between different WooCommerce versions.

Fix - Prevent sending empty values for required support email and phone fields.

Stripe does not accept empty strings for support phone and email. We don't have to send empty values for these fields.

Testing instructions

  • go to Card readers -> Receipt details section
  • set an empty value for email -> an error should be displayed and the save button disabled
  • set an empty value for phone number -> an error should be displayed and the save button disabled

Fix - Update platform URL to pay.woo.com

This updates all instances of woo.app to pay.woo.com.

Testing instructions

  • Make sure platform checkout is enabled for your merchant site.
  • When PLATFORM_CHECKOUT_FRONTEND_HOST and PLATFORM_CHECKOUT_HOST is not set, WCPay attempts to load the OTP iframe from pay.woo.com

Update - Update KYC reminder email Tracks properties

Track merchants visiting the Connect page with the special URL param to redirect them to the KYC flow. **If you don't have access to Live Track, you can't test case. Please don't hesitate to ask someone with access to this tool in order to help you with testing ** These events were originally introduced in #3958. Server-side property names of KYC reminder emails were recently updated in 1995-gh-Automattic/woocommerce-payments-server, this PR adjust the client side track event, wcadmin_wcpay_kyc_reminder_merchant_returned to match the above changes.

Testing instructions

  • Make sure Tracking is enabled in WC options. That's in {your site}/wp-admin/admin.php?page=wc-settings&tab=advanced&section=woocommerce_com.
  • Make your site publicly accessible.

Initial:

  • Visit {website url}/wp-admin/admin.php?page=wc-admin&path=%2Fpayments%2Fconnect&wcpay-connect-redirect=initial
  • Go to Live Tracks and search wcadmin_wcpay_kyc_reminder_merchant_returned
  • Wait ~5 minutes after visiting the URL (it could take ~10 mins for the event to show up)
  • Confirm the event has eventprops [ offset: 1, description: initial ] in its properties

second:

  • Visit {website url}/wp-admin/admin.php?page=wc-admin&path=%2Fpayments%2Fconnect&wcpay-connect-redirect=second
  • Go to Live Tracks and search wcadmin_wcpay_kyc_reminder_merchant_returned
  • Wait ~5 minutes after visiting the URL (it could take ~10 mins for the event to show up)
  • Confirm the event has eventprops [ offset: 3, description: second ] in its properties

Follow-ups

  • Visit {website url}/wp-admin/admin.php?page=wc-admin&path=%2Fpayments%2Fconnect&wcpay-connect-redirect={ 1 | 2 | 3 | 4}
  • Go to Live Tracks and search wcadmin_wcpay_kyc_reminder_merchant_returned
  • Wait ~5 minutes after visiting the URL (it could take ~10 mins for the event to show up)
  • Confirm the event has eventprops [ offset: 7 | 14 | 21 | 28, description: weekly-{1|2|3|4} ] in its properties

Compatibility with WordPress 6.0

WordPress 6.0 should be released on May 24th 2022.

We should manually test compatibility between WCPay and the new WordPress version. We should also test the default theme, which is still TwentyTwentytTwo.

Testing instructions

Usage of this plugin is mandatory because it provides an easy way to install the latest WordPress version. It can also be installed through the Include WordPress Beta Tester checkbox on JN.

  • Make sure to test Critical Flows with WordPress 6.0 installed.
  • Make sure to preform testing with the default theme, which is still TwentyTwentytTwo

Fix: invalid_request_error for payment_intents caused by level3 data unit_cost is negative value for discount

We are fixing an error thrown by the Stripe API. This error happened when a payment_intent included a negative unit_cost in the line_items level3 data. The level3 data is a set of additional information related to the transaction, that gets embedded in the payload that we send to Stripe to create a Payment Intent. Among others, it includes information about the line_items of the transaction.

It is important to note that the level3 data is meant to be processed by the card provider. It is not something that the merchant is necessarily interested in. As a matter of fact, there is no place in the WP Admin where the merchant could check the level3 data associated to a transaction. Furthermore, the Payment Intent is retried in case there is a failure, discarding the level3 data.

With those considerations in mind, we should test that there are no regression during the checkout process, caused by this fix. This change should be transparent to both the merchants and the customers. I think that the testing of this issue is mostly covered by the critical flows testing. But we can include one more testing scenario, please check below.

Testing instructions

Prerequisites

  • Fresh JN site with WC Payments set up & onboarded and products created

Then

  • Go to WP Admin > Products > Add New
  • Fill the product details, setting a negative amount in the Regular Price field, and Publish the product.
  • Visit the store and make an order with some products, including the product created in previous step. Note that the total amount of the order needs to be greater than 0.5 to be able to checkout
  • Proceed to place the order
  • Confirm that the order is created correctly

UPE Survey Enhancements

Testing instructions

  • Go to WP Admin > Payments > Settings. If UPE (new WooCommerce Payments checkout experience) is not enabled, turn it on.
  • Disable it.
  • See a new form of sending feedback.
  • Expectation: the system status report field displays, and it's possible to edit this field.
  • Expectation: see two different options buggy and slow for the first question.
  • Submit the form by clicking "Send feedback" button.
  • Report if there is any issue when submitting the form, make sure to include test site URLs in the report.

Handle partly restricted account status

New account status has been introduced that tells the end customer that some payment methods or deposits has been disabled. This PR handles the new status and show correct message to the end user.

Screenshot 2022-05-20 at 17 39 22

Testing instructions

  • Make sure that you one of the payment methods doesn't have all necessary documents. The best way to achieve this is to submit for new payment method and stop it at the middle of setup.
  • On your status overview page you should see a message that says that some payment methods or deposits has been disabled.

If you'd like to simulate the new status, you can apply this snippet locally:

diff --git a/includes/class-wc-payments-account.php b/includes/class-wc-payments-account.php
index 196858fb7..a39b50e36 100644
--- a/includes/class-wc-payments-account.php
+++ b/includes/class-wc-payments-account.php
@@ -186,6 +186,8 @@ class WC_Payments_Account {
                        ];
                }
 
+               $account['status'] = 'restricted_partially';
+
                return [
                        'email'               => $account['email'] ?? '',
                        'country'             => $account['country'] ?? 'US',

UPE Survey Enhancement

Goal: require a more detail with UPE disablement survey submissions.

Acceptance criteria

Stripe is requesting more details to our feedback, can we request that folks supply examples, logs, or relevant site details to help us troubleshoot and pass this back to Stripe?

Split "slow or buggy" into two separate checkboxes - one for "It is slow" and one for "It is buggy" (these are different things we want to track separately) Change "Comments (Optional)" label to say "Please provide additional details to help us improve the experience" System status report (ideally entire report)

When loading SSR After finishing to load SSR
loading loaded

Testing instructions

  • Go to WP Admin > Payments > Settings. If UPE (new WooCommerce Payments checkout experience) is not enabled, turn it on.
  • Disable it.
  • See the new form of sending feedback.
  • Expectation: the system status report field displays, and it's possible to edit this field.
  • Expectation: see two different options buggy and slow for the first question.
  • Submit the form by clicking "Send feedback" button.

There are more testing steps that require private info: 2c6e9-pb

Fix invalid_request_error when level3 line_items contain a negative unit cost

Fixes invalid_request_error when a payment_intent is created with level3 data. If the order contains a product that has a negative price, Stripe throws an error: Invalid non-negative integer.

The fix proposed would be to check if there is a line_item in the order with a negative price when the level3 data is calculated. When that is the case, we map the data in a different way:

  1. Map the calculated unit_cost as discount_amount. We have to take the absolute value since Stripe only supports positive values
  2. The unit_cost is set to 0

Testing instructions

  1. Go to WP Admin > Products > Add New
  2. Fill the product details, setting a negative amount in the Regular Price field, and Publish the product.
  3. Create an order with some products, including the product created in previous step. Note that the total amount of the order needs to be greater than 0 to be able to check out.
  4. Proceed to checkout and pay the order.
  5. Check that the order is processed correctly.
  6. In the Stripe Dashboard, check that the created payment contains the level3 data. Please check that the line_items are correct. The product with a negative price should show a unit_cost of 0 and the discount_amount should match the absolute value of the product price.

Expected level3 data in Stripe's dashboard for the payment

Screen Shot 2022-05-10 at 12 22 02

Allow merchant to set store logo on Platform Checkout settings

Add a new file field on Platform Checkout settings that updates merchant store logo.

Testing instructions

  • Access WCPay settings.
  • On Platform Checkout, click on Customize.
  • On Store logo section, click Upload custom logo.
  • After upload finish, click Save changes.
  • Reload the page, it should be persisted.

Add exception handling to prevent fatal errors when fetching payment methods on the checkout block

Prevent fatal errors when fetching payment methods on the checkout block

Before After
Before After

Testing instructions

To be able to reproduce this bug you will need to suspend your account:

  • Open your account's RC
  • Go to the "WooCommerce Payments" section and search for the "Account tool" subsection
  • On the dropdown select "Hard Block Account" and then click on "Apply Account Action"
  • Clear your account cache on WCPay Dev

After suspending your account, you will need to publish a page using the Checkout Block:

  • Install the "WooCommerce Blocks" plugin in case you don't have it installed yet
  • Create a new page accessing "Pages > Add new"
  • Type / in the editor and search by "checkout"
  • Add the "Checkout" block and publish the new page

On the store:

  • Add a product to your cart
  • Access the page that you have just created
  • You should see the following error
Before

In case it doesn't show the error, try to clear the WooCommerce Payments cache

Update payment gateway method description

Update payment gateway method description to display the full copy with T&C and Privacy Policy.

Testing instructions

  • Go to Woocommerce > Settings
  • Go to Payments tab
  • Observe that the WCPay description is

Payments made simple, with no monthly fees – designed exclusively for WooCommerce stores. Accept credit cards, debit cards, and other popular payment methods.

By using WooCommerce Payments you agree to be bound by our Terms of Service and acknowledge that you have read our Privacy Policy

Update payment method id order meta after checkout

When we create an account through the platform checkout experience (i.e. when a customer ticks Save my information for faster checkouts) the payment method ID sent to the server (and thus saved to the order) is a platform payment method. This caused issues, such as the merchant not being able to refund the order used to create the platform checkout account because the payment method in the order meta is not available to the merchant account.

Testing instructions

  1. Make sure you have a platform checkout website, a merchant store.
  2. Add an item to the cart and go to the Checkout page.
  3. Use an email address that does not have a platform checkout account associated with it yet.
  4. Fill in the customer information and make sure you tick Save my information for faster checkouts.
  5. Add a valid phone number.
  6. Click Place order to complete the payment.
  7. Open wp-admin and go to WooCommerce > Orders and find the order you just placed.
  8. Try to refund the order.
  9. The refund should succeed.
  • Repeat the process, but this time do not tick Save my information for faster checkouts to make sure refunds for normal refunds still work.
  • Disable the Platform Checkout Experience on the merchant store, make an order, and make sure refunds still work.
  • Create a new merchant store that hasn't been gated into the Platform Checkout Experience, make an order, and make sure refunds still work.

Register draft order status hooks to stores with platform checkout enabled

"Pending payment" order is created in the merchant store before an order is placed when Platform Checkout is used

Testing instructions

  • Have an existing Platform Checkout account
  • Add item to cart and go to checkout on merchant store
  • Authenticate with Platform Checkout and get redirected to hosted checkout, but don't complete checkout
  • Go to order list in merchant admin and find an associated order has been created with "Pending payment" as the status

Modify the pointer content on the "Add new product" page when WCS is not active

Modify the pointer content found on the "Add new product" page when WooCommerce Subscriptions is not active.

Testing instructions

Scenario 1: WCS is active (no change)

  1. Have a WordPress website with WooCommerce Payments installed. WooCommerce Subscriptions should be installed and activated.
  2. Navigate to /wp-admin/post-new.php?post_type=product&select_subscription=true&subscription_pointers=true
  3. Observe, the content in the pointer is "The WooCommerce Subscriptions extension adds two new subscription product types - Simple subscription and Variable subscription."
Screen Shot 2022-05-18 at 1 52 35 pm

Scenario 2: WCS is not active

  1. Have a WordPress website with WooCommerce Payments installed. WooCommerce Subscriptions should not be installed or activated.
  2. Navigate to /wp-admin/post-new.php?post_type=product&select_subscription=true&subscription_pointers=true
  3. Observe, the content in the pointer is "WooCommerce Payments adds two new subscription product types - Simple subscription and Variable subscription."
Screen Shot 2022-05-18 at 1 53 30 pm

Add information to the "Capture Later" settings that only card payment method will be enabled with this setting.

If a user has enabled UPE and added additional payment methods and then enables "Authorization and Capture Later", only the card payment method is shown in checkout and other payment methods disappear. To avoid confusion for the merchants, we add information in the Payment > Settings page to make it clear that only the credit card method is compatible with "capture later".

Testing instructions

  • On your site, activate UPE and visit Payment > Settings page: you should see that UPE methods can be enabled/disabled and appear just like the Credit card / Debit card method
  • Check the "Issue an authorization on checkout, and capture later" checkbox: a confirmation modal is shown with the relevant text
  • If you cancel, then nothing has changed for the appearance of the payment methods
  • If you try again to check the checkbox and confirm your choice, you should now see that the appearance of UPE methods has changed
    • instead of a checkbox to enable/disable, there's a warning icon which shows a tooltip when hovering over it
    • there's an overlay that indicates that it is not "available"
  • If you uncheck the checkbox, you should not see a confirmation modal and the appearance should be back to normal for all payment methods
  • If UPE is disabled, enabling/disabling the manual capture should be immediate, without a confirmation modal.
Clone this wiki locally