Title: php function to query if in test mode ?
Last modified: October 7, 2020

---

# php function to query if in test mode ?

 *  Resolved [chchch](https://wordpress.org/support/users/goch/)
 * (@goch)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/php-function-to-query-if-in-test-mode/)
 * Hi
 * I’m looking for the php function that I can call to query if woocommerce is in“
   Test Mode” or “Live Mode” but I could’t find it. Can anyone point me to it?
    
   Thanks!
 * (I’m trying to move away from ‘easy digital download’ and set up ‘woocommerce’.
   I was using edd_is_test_mode() in one of my script so I’m looking for the woocommerce
   equivalent).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Adam Heckler](https://wordpress.org/support/users/adamkheckler/)
 * (@adamkheckler)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/php-function-to-query-if-in-test-mode/#post-13504736)
 * WooCommerce itself does not have a “test mode”, but some payment gateways do,
   e.g. Stripe:
 * [https://docs.woocommerce.com/document/stripe/#section-25](https://docs.woocommerce.com/document/stripe/#section-25)
 * … which you can check using your own code, perhaps like so:
 *     ```
       $woocommerce_stripe_settings = get_option( 'woocommerce_stripe_settings', array() );
   
       if ( 'yes' === $woocommerce_stripe_settings['testmode'] ) {
       	// Do some stuff in test mode :)
       }
       ```
   
 * There are many payment gateways, both made by us and third-party, so you’ll need
   to look into the specific ones you’re using to find whether they have a test 
   mode or not.
 * Hope that helps! 🙂
 *  Thread Starter [chchch](https://wordpress.org/support/users/goch/)
 * (@goch)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/php-function-to-query-if-in-test-mode/#post-13505827)
 * exactly what I needed. thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘php function to query if in test mode ?’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [chchch](https://wordpress.org/support/users/goch/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/php-function-to-query-if-in-test-mode/#post-13505827)
 * Status: resolved