Best Multi Vendor Marketplace Plugin for WordPress › Forums › WCFM – Ultimate › Store Slug And Limiting Store Slug Changes
- This topic has 7 replies, 2 voices, and was last updated 7 years, 1 month ago by
WCFM Forum.
- AuthorPosts
- August 21, 2019 at 9:44 am #77621
official
Participant1. How can I delete the “-” character in the new vendor registration form? For example: Store name “Ex Store” will produce “domain.com/slug/ex-store”.
2. How can I limit the replacement of the store slug in the vendor settings dashboard? For example: it can only be replaced once.Thank You
Attachments:
You must be logged in to view attached files. - August 22, 2019 at 5:14 pm #77831
WCFM Forum
MemberHi,
Please add this code to your site –
add_filter( 'wcfm_generated_store_slug', function( $store_slug ) { $store_slug = str_replace( '-', '', $store_slug ); return $store_slug; }); add_filter( 'wcfm_is_allow_store_slug', '__return_false' );Add this code to your child theme’s functions.php
In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/Thank You
- August 24, 2019 at 3:41 am #78090
official
ParticipantThen when the vendor changes the membership plan, they can change the store slug again (following the store name).
So how can I remove the Store Name field from the membership plan? But is the Store Name in the vendor settings NOT REMOVED?
- August 29, 2019 at 11:40 am #78938
WCFM Forum
MemberHi,
Well, you asked me code for removing “Store Slug”, do you want to remove “Store Name” as well?
Between, this code will applicable on all membership plans.
Thank You
- September 3, 2019 at 1:49 am #79735
official
ParticipantOkay, send your code.
- September 4, 2019 at 8:34 am #79954
WCFM Forum
MemberHI,
Use this code –
add_filter( 'wcfm_is_allow_store_name', '__return_false' );Thank You
- September 5, 2019 at 2:19 am #80137
official
ParticipantWhen I use the code, new vendors cannot enter the store name (First register).
So what I mean is: That vendors have registered on my site, they can’t change the store name when they want to increase / change store membership.
- September 6, 2019 at 4:41 pm #80442
WCFM Forum
MemberHI,
Please use this updated code –
add_filter( 'wcfm_is_allow_store_name', function( $is_allow ) { if( is_user_logged_in() ) $is_allow = false; return $is_allow; });Thank You
- AuthorPosts
- The topic ‘Store Slug And Limiting Store Slug Changes’ is closed to new replies.