Skip to content

Instantly share code, notes, and snippets.

@amdrew
Created October 25, 2013 06:48
Show Gist options
  • Select an option

  • Save amdrew/7150371 to your computer and use it in GitHub Desktop.

Select an option

Save amdrew/7150371 to your computer and use it in GitHub Desktop.
Add more required fields
<?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