BLOG
BlogGuides

Test a WooCommerce checkout after every update

WooCommerce, payment plugins and the theme update on their own schedules, and the checkout is where they collide. A nightly test places an order and checks it arrived.

The page that pays for the site#

For a client's shop, the checkout is the page that matters, and the one that breaks most quietly. WordPress, WooCommerce, the payment gateway, the theme and a dozen plugins all update separately, and the checkout is where their code meets.

The support forums are full of the same story:

None of these shows on the home page. Uptime checks see a 200. The shop owner finds out when sales stop.

The test#

Run it on the live shop with a payment method that takes no money, or on a staging copy with the gateway in its test mode.

Open the product "Linen apron" and choose the size "M".
Add it to the cart and check the cart shows 1 × Linen apron.
Go to checkout and fill in the name "Test Order", the email
address of this test, and the shop's own address.
Choose the payment method "Cheque payments".
Place the order.
Check the order received page shows an order number and
"Linen apron".
Open the order confirmation email and check it shows the same
order number.

Notes on making it safe and useful:

  • A payment method that takes no money. Many shops can enable an offline method such as cheque or bank transfer, visible only to a test customer or only on staging. With a card gateway, use its test mode on staging; never put a test card through a live gateway.
  • The run's own email address. Give the test a mailbox and the order confirmation is checked too: the email is where many checkout breaks show first.
  • Clean up. Cancel test orders on a schedule, or mark them so the client's reports can exclude them (how).

Run it when things change#

  • Nightly, on a schedule, so an automatic update overnight is caught by the morning.
  • Straight after you update plugins by hand: Check forms after every WordPress plugin update has the routine.
  • At phone size, as a second test: most shop visits are on phones, and checkout layouts change there (sizes).

When it fails, the result shows the step and what was on the screen, with a replay; send the share link to whoever fixes it.

We have not run this test on a WooCommerce shop for this post. The same pattern for Shopify, with Shopify's test gateway, is in Test Shopify add to cart and checkout.

This post is part of Find the bug before your client does.

Filed underWebForms and checkoutReleases and regressionsClient sites