Created
June 26, 2015 21:32
-
-
Save michaeldoye/f34c00f0f157490d5afb to your computer and use it in GitHub Desktop.
Add custom field to edit address page
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
// add fields to edit address page | |
function woo_add_edit_address_fields( $fields ) { | |
$new_fields = array( | |
'date_of_birth' => array( | |
'label' => __( 'Date of birth', 'woocommerce' ), | |
'required' => false, | |
'class' => array( 'form-row' ), | |
), | |
); | |
$fields = array_merge( $fields, $new_fields ); | |
return $fields; | |
} | |
add_filter( 'woocommerce_default_address_fields', 'woo_add_edit_address_fields' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment