Created
May 10, 2023 16:47
-
-
Save mircobabini/badc966f58182164dfcdf7c33c3f44f1 to your computer and use it in GitHub Desktop.
This file contains 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
<?php | |
add_filter( 'pmpro_include_billing_address_fields', function ( $include ) { | |
// if someone forced to include the fields | |
// but it's set to NOT include them in settings | |
// and Stripe Checkout is active | |
// and Stripe Checkout is set to include billing address fields on its checkout page | |
// => don't include them, bc it's a conflict with some other add-on or snippet | |
if ( $include && ! pmpro_getOption( "stripe_billingaddress" ) && 'checkout' === pmpro_getOption( 'stripe_payment_flow' ) && pmpro_getOption( 'stripe_checkout_billing_address' ) ) { | |
$include = false; | |
} | |
return $include; | |
}, 1000000000 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment