Forked from kimcoleman/my_pmpro_required_billing_fields.php
Last active
April 22, 2020 13:30
-
-
Save kimwhite/0ee8b09da4392042b7a486173163d2de to your computer and use it in GitHub Desktop.
Make sure address fields are required
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 | |
/** | |
* Make sure address fields are required | |
*/ | |
function my_pmpro_required_billing_fields( $fields ) { | |
global $bfirstname, $blastname, $baddress1, $bcity, $bstate, $bzipcode, $bcountry, $bphone, $bemail; | |
$fields[ 'bfirstname' ] = $bfirstname; | |
$fields[ 'blastname' ] = $blastname; | |
$fields[ 'baddress1' ] = $baddress1; | |
$fields[ 'bcity' ] = $bcity; | |
$fields[ 'bzipcode' ] = $bzipcode; | |
$fields[ 'bemail' ] = $bemail; | |
return $fields; | |
} | |
add_action( 'pmpro_required_billing_fields', 'my_pmpro_required_billing_fields', 30 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment