Last active
May 5, 2021 16:18
-
-
Save xlplugins/f18a180beb469d59437c852f2d4f8b41 to your computer and use it in GitHub Desktop.
Character limitation for Address 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
add_filter( 'wfacp_forms_field', function($field,$key){ | |
if($key=='billing_number' || $key=='shipping_number'){ | |
$field['custom_attributes']['maxlength']=8; | |
} | |
else{ | |
if($key=='billing_address_2' || $key=='shipping_address_2'){ | |
$field['custom_attributes']['maxlength']=25; | |
} | |
} | |
return $field; | |
},10,2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment