Skip to content

Instantly share code, notes, and snippets.

@WillBrubaker
Created April 25, 2018 12:47
Show Gist options
  • Select an option

  • Save WillBrubaker/070427b6a1d52dd066513b2ce8d9b1c8 to your computer and use it in GitHub Desktop.

Select an option

Save WillBrubaker/070427b6a1d52dd066513b2ce8d9b1c8 to your computer and use it in GitHub Desktop.
WooCommerce Stripe Force 3D Secure
/* 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