Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WC Marketplace › Store name as username
- This topic has 7 replies, 2 voices, and was last updated 4 years, 6 months ago by Sushobhan.
- AuthorPosts
- April 29, 2020 at 5:04 pm #124638admin-6781Participant
Is there a way to make store name and username same? When vendor register just enter store name and login with store name?
thank you - April 29, 2020 at 6:17 pm #124665SushobhanKeymaster
Hi,
Thanks for getting in touch with us!
First ensure Username field is present in your vendor registration form. If not, you can enable it from Admin dashboard >> Memberships >> Membership Settings (cogwheel symbol at the extreme right of the header panel) >> Registration Fields page.
Now, use the following code to remove Store Name field from registration page.
add_filter( 'wcfm_is_allow_store_name', '__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/
Let me know how this goes.
Thanks! - April 29, 2020 at 9:00 pm #124724admin-6781Participant
Sorry incase my question wasnt clear.
Lets say I vendor created an account name “username” after that he doesn’t need to set store name. his store name will be “username” too. instead of My Store or anything else. So this person can login with username . and his store name will be automatically “username” is this possible?
- April 30, 2020 at 10:07 pm #125157SushobhanKeymaster
Hi,
Have you tried the steps I told you. It should do what you want.
I think you might get confused with the ‘My Store’ label, just beside the vendor store logo. Ref: https://imgur.com/WrNZ4P9. Go to the store page and ther you will see the store name same as username.
If you want, you can change ‘My Store’ label from WCFM admin dashboard >> Settings >> Dashboard >> My Store Label. By default this text is same for all the vendors, but that too can be customised using the following snippet-add_filter( 'wcfm_store_name', function($store_name) { $store_user = wcfmmp_get_store(); if($store_user) { $vendor_id = $store_user->get_id(); $store_open_by = apply_filters( 'wcfm_shop_permalink_open_by', 'target="_blank"', $vendor_id ); $shop_link = wcfmmp_get_store_url( $vendor_id ); return '<a ' . $store_open_by . ' href="' . apply_filters('wcfmmp_vendor_shop_permalink', $shop_link) . '">' . ucfirst( $store_user->get_shop_name() ) . '</a>'; } return $store_name; }, 11 );
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/
Let me know how this goes.
Thanks! - April 30, 2020 at 10:44 pm #125170admin-6781Participant
Thank you very much with that add function code it worked.
Best support!!
- April 30, 2020 at 10:53 pm #125173SushobhanKeymaster
You are always welcome 🙂
Let me know if there’s anything else we can help you with.
Can we ask for a favor? Would you mind taking a few minutes to review our plugin (if you haven’t already) at https://wordpress.org/support/plugin/wc-multivendor-marketplace/reviews/ and let others know about your 5 Star experience with WCFM Marketplace. Also, follow us on Twitter https://twitter.com/wcfmmp for more exciting news, important updates, and irresistible offers. - April 30, 2020 at 11:39 pm #125186admin-6781Participant
5 star review done
twitter follow doneThanks
- April 30, 2020 at 11:59 pm #125192SushobhanKeymaster
Thank you. It means a lot to us! 🙂
- AuthorPosts
- You must be logged in to reply to this topic.