Support » Plugin: WooCommerce Stripe Payment Gateway » Live mode enabled but still showing test mode message

  • Resolved Jorge Díaz


    Hey there, I’m seeing a weird behavior, when I try to do a checkout with Stripe it shows the test mode enabled message, I wanted to give it a go and tested it with the test card but card got declined then, even thought it was showing the message saying that test mode was enabled I did a test charge on my card and it succeded, so it’s working but why does it show the message saying that test mode is enabled when obviously is processing cards correctly??

    Thanks in advance!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support Hannah S.L. a11n


    Automattic Happiness Engineer

    This is usually due to the Stripe settings in WooCommerce – you’ll need to make sure both “test mode” is disabled and the live keys are being used.

    Please let me know how it goes!

    • This reply was modified 4 years, 11 months ago by Hannah S.L. a11n. Reason: Fixed markup
    Thread Starter Jorge Díaz


    Hi Hannah, thank you for your reply.

    Actually, it’s working, because even thouth I see the “TEST MODE ENABLED” message in the checkout section, I can’t use the test card, and if I use my card, then the transactions are succeful.

    The “Enable Test Mode” check is not checked and I see my live keys in place, I know that if I enabled test mode the test keys input fields are enabled but this is not the case. I already test on different browsers, cleaned checkout on website and computer but still see the message saying that test mode is enabled.

    Thanks in advance.

    Plugin Support Mike M. a11n


    Automattic Happiness Engineer

    Hi Jorge,

    It sounds like there may be some caching going on either via a plugin or perhaps on your server. If you’re using a CDN, you should clear the cache there as well. If you’re unsure about server level caching, I would suggest reaching out to your host.

    I have this same issue I am using live keys and dont have test mode enabled. I have also verified and its not the caching and as an additional measure i disabled all caching options.

    Please help.

    @crystalairsystem Are you sure that your site has an SSL certificate installed? You need to see the https:// in the URL. Test mode will work because it’s just a test and doesn’t need an SSL. But once in Live Mode, nothing will show since an SSL is required for all credit card transactions.

    Thread Starter Jorge Díaz


    Hey there everyone!

    Ok, so I’ve purged all cache (nginx, w3 total cache and CloudFlare cache), but still see the “Test Mode” message when selecting the Stripe option to make the payment…

    BUT, I can process a live transaction correctly (I see the live option is enabled and the fields are showing my live keys). And I tried with a test card (the one showing in the message) but got an error saying that the card was rejected.

    So, when I try to checkout, I see the message saying that Test Mode is Enabled, but when I try to do a charge with the test card, it says that the card is not valid, but if I try with my international dbeit card, then the charge is processed correctly, so how can I hide the message (as a workaround).

    Thanks in advance!

    Hello Everyone!

    I am experiencing the same issue. I would like to add some more details here.

    Host: WPEngine

    PHP + MySQL: Latest versions

    SSL Certificate: Installed, every page of the site is HTTPS.

    WooCommerce + Stripe plugin: Latest versions

    Theme: DIVI (Latest version)

    WooCoomerce > Settings > Checkout Options > Force secure checkout: True/Checked

    WooCoomerce > Settings > Stripe > Enable Test Mode: False/Not-checked

    Live Secret Key + Live Publishable Key: Has proper values.

    All caches have been disabled and/or purged.

    The site is Japanese and has WooCommerce Multilingual installed. I am not sure if the character encoding / multilingual is creating a bug internally.

    The checkout page still shows – “Pay with your credit card via Stripe. TEST MODE ENABLED. In test mode, you can use the card number 4242424242424242 with any CVC and a valid expiration date or check the documentation “Testing Stripe” for more card numbers.”

    This is so frustrating. Eventually, we had to replace that text using jQuery, but internally the issue is still there.

    If anyone is interested, this is the jQuery code we used.

    jQuery(‘.page-checkout #stripe-payment-data > p’).html(‘Pay with your credit card via Stripe.’);

    We tried to debug the issue a bit. Here is what we found.

    In this file \includes\legacy\class-wc-gateway-stripe.php

    Line # 48

    $this->testmode = ‘yes’ === $this->get_option( ‘testmode’ );

    $this->testmode is being set to true, although $this->get_option( ‘testmode’ ) is “no” !!!

    No idea why.

    Anyone with any helpful input?


    Thread Starter Jorge Díaz


    @hasnaeen your reply is really useful, I think that for now we’re alone here.

    One question, how or where do I add that code to replace the message?

    Thanks in advance.


    There is another post here with the same problem

    I have the same problem and went through these test. Changing the theme didn’t work but after disabling all plugins it worked. I enabled on by one and it seems that “WPML Translation Management” starts the error again.

    any suggestion?

    Thread Starter Jorge Díaz


    Hey @tschabalori that sounds like a pattern, I’mean also using WPML Translation Management.

    Going to test that and let you know, but I don’t think that just disabling the plugin would be a solution, this would be just to test.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Live mode enabled but still showing test mode message’ is closed to new replies.