- What Is WooCommerce Test Mode?
- How to Enable Test Mode in WooCommerce
- Testing Payments with Stripe
- 1. Install the Stripe Gateway
- 2. Get Your Test API Keys
- 3. Enable Test Mode in WooCommerce
- 4. Run a Test Purchase
- Test Card Numbers for Other Gateways
- Testing Payments with the PayPal Sandbox
- Pre-Launch Testing Checklist
- FAQs About WooCommerce Test Mode
- Does WooCommerce have a built-in test mode?
- Will test mode affect my live customers?
- Do I need a special account to use test mode?
- Can I test refunds in test mode?
- How do I turn test mode off?
- Conclusion
So you’ve built your store, added products, and configured your payment gateway. You’re ready to launch — but are you sure the checkout actually works? The last thing you want is a real customer hitting “Pay” only to watch the payment fail.
That’s exactly what WooCommerce test mode is for. It lets you simulate complete purchases — from the checkout form to the order confirmation — without charging a real credit card. In this guide, you’ll learn how to enable test mode, test payments with Stripe and PayPal, and verify everything works before going live.
What Is WooCommerce Test Mode?
WooCommerce test mode is a configuration that lets you run simulated transactions instead of real ones. When it’s enabled, payments are processed through your payment gateway’s sandbox environment — a replica of the live payment system that mimics real behavior without moving actual money.
It’s important to understand that WooCommerce itself doesn’t have one global “test mode” switch. Testing is handled at the payment gateway level. Each gateway — Stripe, PayPal, Authorize.net, Square, and others — provides its own testing mechanism, usually called a sandbox or test mode.
With test mode enabled, you can still create real orders, trigger confirmation emails, apply coupons, and test refunds. The only difference is that no real card is ever charged — which is exactly what you want during development.
How to Enable Test Mode in WooCommerce
Since test mode lives inside each payment gateway, the exact location depends on which gateway you use. In most cases, the path looks like this:
- Go to WooCommerce → Settings → Payments in your WordPress dashboard.
- Find your active payment gateway and click Manage.
- Look for a checkbox or toggle labeled Enable test mode, Sandbox mode, or similar.
- Save your changes.
If your gateway doesn’t offer a built-in test mode, you can still test using the gateway’s sandbox credentials — as we’ll do with PayPal below.
Tip: Test on a staging copy of your site whenever possible. This keeps experimental orders out of your live store’s reports and lets you experiment freely.
Testing Payments with Stripe
Stripe is one of the easiest gateways to test because its test mode is built directly into the official plugin. Here’s the full setup:
1. Install the Stripe Gateway
Install and activate the free WooCommerce Stripe Payment Gateway plugin from the WordPress plugin directory, then connect it under WooCommerce → Settings → Payments → Stripe.
2. Get Your Test API Keys
Log in to your Stripe dashboard, go to Developers → API keys, and make sure the Test data toggle is switched on. Copy both the publishable and secret keys — they’ll start with pk_test_ and sk_test_.
3. Enable Test Mode in WooCommerce
Back in the Stripe settings, check Enable test mode and paste in both test keys. Save your changes — your store is now processing test payments.
4. Run a Test Purchase
Add a product to the cart and complete checkout using Stripe’s standard test card:
4242 4242 4242 4242
Any future expiration date
Any 3-digit CVCIf everything is configured correctly, the order will complete, the stock will decrease, and the confirmation email will arrive — all in test mode. To test a declined payment, use 4000 0000 0000 0002.
Test Card Numbers for Other Gateways
Most payment processors accept the same standard test card numbers, since they follow Stripe’s widely adopted test format. Here are the most common ones:
| Card Brand | Test Number | CVC |
|---|---|---|
| Visa | 4242 4242 4242 4242 | Any 3 digits |
| Mastercard | 5555 5555 5555 4444 | Any 3 digits |
| American Express | 3782 822463 10005 | Any 4 digits |
| Discover | 6011 1111 1111 1117 | Any 3 digits |
If you use a different processor like Authorize.net, Square, or Klarna, check their documentation for dedicated sandbox credentials and test card numbers.
Testing Payments with the PayPal Sandbox
PayPal doesn’t use test card numbers — instead, it provides a full sandbox environment that simulates real PayPal accounts. Here’s how to set it up:
- Create sandbox accounts. Go to the PayPal Developer portal and log in with your PayPal account. Under Testing Tools → Sandbox accounts, you’ll find a default business and personal account — or create your own.
- Enable PayPal in WooCommerce. Under WooCommerce → Settings → Payments → PayPal, enable the gateway, paste your sandbox API credentials, and check the PayPal sandbox option.
- Run a test purchase. In a separate browser or incognito window, check out with PayPal as a customer. You’ll be redirected to
sandbox.paypal.com, where you can log in with your personal sandbox account and approve the payment. - Verify the order. Return to WooCommerce and confirm the order status updated to Processing or Completed.
Pre-Launch Testing Checklist
Enabling test mode is only half the job — a real checkout involves more than a successful payment. Before you switch to live mode, run through this checklist:
Before testing payment gateways, review your WooCommerce checkout fields so unnecessary inputs, required-field rules, and custom validation do not block legitimate orders.
Store visibility matters too — private products you are hiding from customers still appear on your shop page while you are logged in as admin. See how to hide private products from the WooCommerce shop page so your test browsing matches what customers actually see.
- Successful payment creates an order with the correct status.
- Declined payment shows a friendly error message.
- Order emails arrive for both admin and customer.
- Refunds process correctly from the order screen.
- Coupons and taxes calculate as expected.
- Guest checkout and logged-in checkout both work.
When everything passes, disable test mode, add your live API keys, and place one final real order with a real card — then refund it.
FAQs About WooCommerce Test Mode
Does WooCommerce have a built-in test mode?
No. Test mode is provided by each individual payment gateway. Most major gateways — including Stripe, PayPal, and Square — include a test or sandbox option in their settings.
Will test mode affect my live customers?
Yes, it can. While test mode is enabled, anyone who checks out will go through the test flow. That’s why it’s best to test on a staging site — or during low-traffic hours — and switch back to live mode as soon as you’re done.
Do I need a special account to use test mode?
For Stripe, no — test mode is available on every Stripe account. For PayPal, you’ll use free sandbox accounts created through the PayPal Developer portal.
Can I test refunds in test mode?
Yes. In Stripe test mode, place a test order and refund it from WooCommerce → Orders. The refund will be simulated on the gateway side and logged on the order.
How do I turn test mode off?
Go back to your gateway’s settings, uncheck the test mode option, and enter your live API keys. Then place one real transaction to confirm everything works.
Conclusion
WooCommerce test mode takes ten minutes to set up and can save you from a launch-day disaster. A failed checkout doesn’t just cost you a sale — it costs you the customer’s trust.
Enable test mode, run through the full purchase flow with test cards and the PayPal sandbox, verify your emails and refunds, then flip the switch to live mode with confidence.
And if you’d rather have an expert handle your store’s setup, testing, or troubleshooting, hire an expert WooCommerce developer — or reach out to me directly.
Payment testing should be part of every WooCommerce HPOS migration checklist. Verify that successful, declined, and refunded orders remain correct after switching storage.
