Created
April 25, 2018 12:47
-
-
Save WillBrubaker/070427b6a1d52dd066513b2ce8d9b1c8 to your computer and use it in GitHub Desktop.
WooCommerce Stripe Force 3D Secure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Not sure what to do with these code snippets? See: https://www.thathandsomebeardedguy.com/what-do-i-do-with-these-code-snippets/ */ | |
| add_filter( 'wc_stripe_require_3ds', 'handsome_beardedguy_maybe_force_3ds', 10, 2 ); | |
| function handsome_beardedguy_maybe_force_3ds( $required, $source_object ) { | |
| return ( is_object( $source_object ) && property_exists( $source_object, 'card' ) && 'optional' === $source_object->card->three_d_secure ) ? true : $required; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment