Created
January 27, 2021 16:23
-
-
Save clifgriffin/160d0c74f699c5e5186b6d69bbe88148 to your computer and use it in GitHub Desktop.
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 | |
add_filter( 'woocommerce_default_address_fields', function( $fields ) { | |
$fields['address_1']['custom_attributes']['data-parsley-pattern'] = '.*[0-9].*'; | |
$fields['address_1']['custom_attributes']['data-parsley-error-message'] = 'Please enter your house number.'; | |
return $fields; | |
}, 100001 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment