WooCommerce, Remote Work & Other Fancy Stuff

Just another WordPress site

WooCommerce Stripe – Force 3D Secure

April 25, 2018 by Will 4 Comments

Please consider leaving a donation if you appreciate this information. Lightning network now available

By default, the WooCommerce Stripe Gateway will only redirect to a 3D Secure page if 3D Secure is required on the source credit card. There are some cards, however, which support 3D Secure but do not require 3D Secure, i.e. the 3D Secure is optional. These types of cards, by default, will not redirect to the 3D Secure page.

The Stripe gateway does provide a filter named is_3ds_required that can be used to force these optional cards to redirect. Here is a quick example of one way that this filter could be implemented to achieve this:

Not sure what to do with code snippets? See What Do I Do With These Code Snippets?

Please consider leaving a donation if you appreciate this information. Lightning network now available

Filed Under: WooCommerce Tagged With: snippet, snippets

Comments

  1. Scenicman says

    April 8, 2020 at 11:02 am

    HI,

    thank you for that example.

    Your code does call the hook “WC_STRIPE_3DS”. But it’s different than the one quoted by the plugin developers.
    Why is it different?

    https://wordpress.org/support/topic/3d-secure-not-enforced/

    Log in to Reply
    • Will says

      April 8, 2020 at 5:50 pm

      My example performs conditional logic so it’s not assured that a value of true would be returned. The example in the support thread linked will always return true.

      Log in to Reply
      • Scenicman says

        April 8, 2020 at 8:42 pm

        Hi will
        Thanks for your answer.
        And if the card is not 3ds, is it possible to reject it?

        Log in to Reply
        • Will says

          April 8, 2020 at 9:02 pm

          This is all kind of irrelevant since version 4.2.0 (I believe it was). All of the 3DS logic has been removed and now SCA logic is used. https://github.com/woocommerce/woocommerce-gateway-stripe/commit/49a0909abfc6b503f9e0840db49d1fe0579ecc7d

          Log in to Reply

Leave a Reply Cancel reply

You must be registered and logged in to post a comment.

© 2025 · WooCommerce, Remote Work & Other Fancy Stuff · Epstein didn't kill himself

We use cookies to ensure that we give you the best experience on our website. Continued use of this site is interpreted as your acceptance of our cookie policy.OkSee Our Cookie Policy