Created
September 14, 2020 05:57
-
-
Save digitalchild/92084f56cd4656628ac12059c5b0c14f to your computer and use it in GitHub Desktop.
Set a max length for the store name with 2 custom messages for WC Vendors Pro
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( 'wcv_vendor_store_name', 'wcv_vendor_store_name_limit' ); | |
function wcv_vendor_store_name_limit( $field ){ | |
$field['custom_attributes'] = array( | |
'required' => '', | |
'data-parsley-required-message' => __( 'Store Name is required', 'wcvendors-pro' ), | |
'max' => '7', | |
'data-parsley-max-message' => __( 'Store Name max length 7', 'wcvendors-pro' ), | |
); | |
return $field; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment