1. Documentation /
  2. WooCommerce Payments Documentation /
  3. WooCommerce Payments: Testing & Troubleshooting /
  4. Testing WooCommerce Payments /
  5. WooCommerce Payments: Dev Mode

WooCommerce Payments: Dev Mode

If you want to test WooCommerce Payments on a site that will not need to process real payments, you can use Dev Mode.

With Dev Mode, it’s possible to create a test account that requires no personal information. This account can then be used to process test transactions. It will only operate in Test Mode and cannot be used to process live transactions.

NOTE: WooCommerce Payments must be connected to WordPress.com, even in Dev Mode. This means it’s not possible to run WooCommerce Payments locally unless you expose your site test to the Internet with ngrok or a similar tool.

Enable Dev Mode

↑ Back to top

To enable Dev Mode, you can either:

  • Ensure your site’s environment type is set to either development or staging.
  • Add the following constant to your site’s wp-config.php file:
define( 'WCPAY_DEV_MODE', true );

Note that Dev Mode must be enabled before starting the signup process in order to properly create a test account!

Create a test account

↑ Back to top

Once you’ve enabled Dev Mode, complete the WooCommerce Payments test account creation process by following these steps:

  1. In your site’s dashboard, click the Payments menu item.
  2. Click the Finish Setup button.
  3. Connect to your WordPress.com account by entering your credentials.
  4. After connect to WordPress.com, the setup process will continue on connect.stripe.com.
    • You can verify that Dev Mode is enabled by looking for the “Test Mode” box.
Test Mode box, indicating that WooCommerce Payments is in Dev Mode.
  1. For the phone number, enter all zeros.
  2. Stripe will ask you to verify the phone number. Click the Use Test Code button.
  3. Enter anything for country and type of business.
  4. Enter any name and birthdate that’s in the past.
  5. Enter any valid email address.
  6. Enter any valid physical address.
  7. Enter all zeros for your tax ID, e.g. a Social Security Number.
  8. Enter any industry.
  9. For your bank details, click the Use Test Account button.
  10. At the end, click Submit to create the test account.
  11. Back on your site, you can verify that you’re in Dev Mode again under Payments > Settings.
Verifying that Dev Mode is enabled after setting up a test account.

Cloning from production to staging

↑ Back to top

If you copy a production site to a staging or development environment, and the site has never been in Dev Mode before, you will need to complete the account set up process again using the test details shown above. This will create a new test account for use while in Dev Mode on that site.

Your transaction data from the production environment will not be available while in Dev Mode on the staging or development environments. It will remain available on the production environment of course.

Disabling Dev Mode

↑ Back to top

To disable Dev Mode, remove this line from your wp-config.php file:

define( 'WCPAY_DEV_MODE', true );

Keep in mind that, even after removing that line, Dev Mode will still be enabled if your site’s environment type is set to either development or staging.

Once Dev Mode is disabled, you will need to go through the account setup again, this time using real information for the account. (If an account was connected before Dev Mode was enabled, the store will revert to that setup.)

NOTE: Using the same site for both testing in Dev Mode and live transactions later on could lead to confusion. This is because test transactions done in Dev Mode will still be visible under WooCommerce > Orders, but not under Payments > Transactions. Other such inconsistencies make this workflow inadvisable. It’s best to use dev mode on staging URLs only, which will never need to take real transactions.

WooCommerce

The most customizable eCommerce platform for building your online business.

  • 30-day money-back guarantee
  • Support teams across the world
  • Safe and secure online payment