Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Marketplace (WooCommerce Multivendor Marketplace) › Customising WCMM vendor registration form
- This topic has 7 replies, 2 voices, and was last updated 5 years, 10 months ago by WCFM Forum.
- AuthorPosts
- January 12, 2019 at 4:59 pm #43226hello4Participant
Hello there,
Could you please show me how to customise the vendor registration form so I can change the label ‘Store Phone’ to ‘Mobile phone’ or something? I tried the following but it didn’t work (first two items work fine).
function wcfm_membership_registration_custom_fields( $registration_fileds ) {
global $WCFM;
if( isset( $registration_fileds[‘first_name’] ) ) {
$registration_fileds[‘first_name’][‘custom_attributes’] = array( ‘required’ => 1 );
}
if( isset( $registration_fileds[‘last_name’] ) ) {
$registration_fileds[‘last_name’][‘custom_attributes’] = array( ‘required’ => 1 );
}
if( isset( $registration_fileds[‘user_phone’] ) ) {
$registration_fileds[‘user_phone’][‘label’] = ‘Blah Blah’;
}
return $registration_fileds;
}
add_filter( ‘wcfm_membership_registration_fields’, ‘wcfm_membership_registration_custom_fields’ );I also need to change the statement for Terms and Condition (just above the Register button). Can this form be overridden using a child theme?
Thanks and regards,
- January 13, 2019 at 7:32 am #43311WCFM ForumMember
Hi,
It has setting option, why you are trying custom coding – https://wclovers.com/knowledgebase/wcfm-marketplace-vendor-registration/
Thank You
- January 13, 2019 at 10:13 am #43328hello4Participant
Thanks, but those settings don’t allow us to change the labels on the actual vendor registration form. Do they? I want to change the labels/text on that form vendors have to fill.
- January 14, 2019 at 3:08 pm #43474WCFM ForumMember
Hi,
Please use such code snippet for the purpose –
function wcfm_custom_translate_text( $translated ) { $translated = str_ireplace( 'Inquiry', 'Requête', $translated ); return $translated; } add_filter('gettext', 'wcfm_custom_translate_text'); add_filter('ngettext', 'wcfm_custom_translate_text');
Thank You
- January 14, 2019 at 3:13 pm #43476hello4Participant
Many thanks! Could you please give me the name of the template/view too if it can be overridden through a child theme?
- January 14, 2019 at 4:09 pm #43501WCFM ForumMember
HI,
NO no, you have to add this code in your child theme’s functions.php and using this code you may change any label to yours.
$translated = str_ireplace( ‘Inquiry’, ‘Requête’, $translated ); – you have to add such line under this function. Where first element is existing string and second is your required string.
Thank You
- January 14, 2019 at 4:14 pm #43504hello4Participant
Sorry I should’ve rephrased it better 🙂 I managed to get it working using the functions.php. Many thanks for that! However, I have some other customisations so could you please tell me the name of the template/view php file?
- January 15, 2019 at 6:11 am #43574WCFM ForumMember
Hi,
That’s great 🙂
I have some other customisations so could you please tell me the name of the template/view php file?
– For registration form? then check at “wc-multivendor-membership/templates/”Thank You
- AuthorPosts
- The topic ‘Customising WCMM vendor registration form’ is closed to new replies.