Created
October 14, 2015 07:03
-
-
Save SeanChDavis/b49b7b2ad5641ad312f3 to your computer and use it in GitHub Desktop.
EDD Required Address Fields
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 // do not copy this line | |
/** | |
* Make address fields required | |
*/ | |
function sd_edd_required_address_fields( $required_fields ) { | |
$required_fields['card_address'] = array( | |
'error_id' => 'invalid_address', | |
'error_message' => 'Please enter your full address' | |
); | |
$required_fields['card_address_2'] = array( | |
'error_id' => 'invalid_address_2', | |
'error_message' => 'Please enter your full address' | |
); | |
return $required_fields; | |
} | |
add_filter( 'edd_purchase_form_required_fields', 'sd_edd_required_address_fields' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment