Store Slug And Limiting Store Slug Changes

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM – Ultimate Store Slug And Limiting Store Slug Changes

Viewing 7 reply threads
  • Author
    Posts
    • #77621
      official
      Participant

      1. 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.
    • #77831
      WCFM Forum
      Keymaster

      Hi,

      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

    • #78090
      official
      Participant

      Then 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?

    • #78938
      WCFM Forum
      Keymaster

      Hi,

      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

    • #79735
      official
      Participant

      Okay, send your code.

    • #79954
      WCFM Forum
      Keymaster

      HI,

      Use this code –

      add_filter( 'wcfm_is_allow_store_name', '__return_false' );

      Thank You

    • #80137
      official
      Participant

      When 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.

    • #80442
      WCFM Forum
      Keymaster

      HI,

      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

Viewing 7 reply threads
  • You must be logged in to reply to this topic.