Created
October 25, 2013 06:48
-
-
Save amdrew/7150371 to your computer and use it in GitHub Desktop.
Add more required fields
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
| <?php | |
| function my_child_theme_validate_fields( $required_fields ) { | |
| $new_required_fields = array( | |
| 'billing_country' => array( | |
| 'error_id' => 'invalid_billing_country', | |
| 'error_message' => __( 'Please enter your Billing Country', 'edd' ) | |
| ) | |
| ); | |
| $required_fields = array_merge( $new_required_fields, $required_fields ); | |
| return $required_fields; | |
| } | |
| add_filter( 'edd_purchase_form_required_fields', 'my_child_theme_validate_fields' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment