how to disable (or make private) vendor-groups page

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 – Groups & Staffs how to disable (or make private) vendor-groups page

Viewing 7 reply threads
  • Author
    Posts
    • #87771
      lewis
      Participant

      Hi 🙂

      i would like to know if it’s possible to disable vendor-groups page (at mydomain.com/vendor-groups/)
      if not, would it be at least possible to make it private, i don’t want it to be public

      thanks for your help wcfm lovers :p

    • #88369
      WCFM Forum
      Keymaster

      Hi,

      Well, this is actually private, no one have any idea about this page or it’s not even by default linked anywhere in frontend.

      As Admin, you only know about this and if you add this link publicly in frontend then only users will able to access this.

      Thank You

    • #88732
      lewis
      Participant

      Hi,
      Thanks for taking time to respond to me.
      That’s what I thought at first, but then I took the time to test it in “private browsing” and that’s where I saw that even without connection, everyone has access to this page . I know that technically the page has no connection anywhere, but search engines could index it. The best would be to have the option of removing it or making it private I think ..

      it’s even the case with your demo: https://wcfmmp.wcfmdemos.com/vendor-groups/
      I am not connected and I can see publicly that you have 3 groups:
      Gratis, Primium and gold.

      Would it be possible to help me making it more private?
      Thanks 🙂

    • #90682
      system
      Participant

      +1
      I need this too.
      Our B2B marketplace need hide the (Our Customers)vendor’s info for business safty requirement.
      Most B2B Customers(as vendor role in marketplace) require to not public theirs info to public.

      I write an additional action to disable these links for no-admin now.
      I hope there will be a option in backend to disable to vendor’s list page and shop page in wcfm-u or wcfm, or just use a shortcode page endpoint hold it for free usage.
      You code is great, Hope you to be better.
      Thanks.

    • #91232
      system
      Participant

      @lewis

      I have thinked out a proccess to disable all vendor’s info to public frontend and vendor’s role:
      1. disable and hide store sidebar, vendor sidebar and vendor’s info fields(name/tel/email/address/etc.) at marketplace settings & store settings & Capability settings.
      2. use this free plugin( https://wordpress.org/plugins/wp-widget-disable/ ) to disable all wcfm widgets(marketplace & store & vendor).
      3. use remove_shortcode() function as following code in theme’s functions.php :
      // —————-
      add_action( ‘init’, ‘remove_wcfm_shortcodes’,9999 );
      function remove_wcfm_shortcodes() {
      remove_shortcode( ‘wcfm_store_info’ );
      remove_shortcode( ‘wcfm_inquiry’ );
      remove_shortcode( ‘wcfm_follow’ );
      remove_shortcode( ‘wcfm_store_fb_feed’ );
      remove_shortcode( ‘wcfm_store_twitter_feed’ );
      remove_shortcode( ‘wcfm_stores’ );
      remove_shortcode( ‘wcfm_store_hours’ );
      }
      // —————-
      4. disable all endpoint begin with /store/ and /vendor-groups/ links.

      I think it will be work and I am trying the step 4 for now.

      hope it is useful for you and another b2b users.

    • #91898
      WCFM Forum
      Keymaster

      HI,

      i would like to know if it’s possible to disable vendor-groups page (at mydomain.com/vendor-groups/)
      if not, would it be at least possible to make it private, i don’t want it to be public

      – Please add this code to your site for the purpose-

      add_action('template_redirect', function( $template ) {
      	if( is_post_type_archive( 'wcfm_vendor_groups' ) ) {
      		wp_safe_redirect( get_permalink( wc_get_page_id( 'shop' ) ) );
      	}
      	return $template;
      }, 100 );

      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

      • #92239
        lewis
        Participant

        thanks for the shortcode, but its not working for me.
        i added the code to my child theme’s functions.php (i know how and did that few more times before)
        cleared the cache
        reload the page, still getting vendor-groups page

    • #92241
      system
      Participant

      the code for the shortcode is to disable the vendor’s info to public, not to disable the vendor-groups.

      here is my code to disable the vendor-groups endpoints :
      // ====================
      //diable wcfm endpoints : store, vendor-groups
      $current_url = ( is_ssl() ? ‘https://’ : ‘http://’ ) . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’];
      if( stripos($current_url, home_url(‘store/’)) === 0 or stripos($current_url, home_url(‘vendor-groups/’)) === 0 ) {
      if ( wp_redirect( home_url() ) ) {
      exit;
      }
      }

      // ====================
      total proccess to disable all vendor’s info to public frontend and vendor’s role:
      1. disable and hide store sidebar, vendor sidebar and vendor’s info fields(name/tel/email/address/etc.) at marketplace settings & store settings & Capability settings.
      2. use this free plugin( https://wordpress.org/plugins/wp-widget-disable/ ) to disable all wcfm widgets(marketplace & store & vendor).
      3. use remove_shortcode() function as following code in theme’s functions.php :
      // —————-
      add_action( ‘init’, ‘remove_wcfm_shortcodes’,9999 );
      function remove_wcfm_shortcodes() {
      remove_shortcode( ‘wcfm_store_info’ );
      remove_shortcode( ‘wcfm_inquiry’ );
      remove_shortcode( ‘wcfm_follow’ );
      remove_shortcode( ‘wcfm_store_fb_feed’ );
      remove_shortcode( ‘wcfm_store_twitter_feed’ );
      remove_shortcode( ‘wcfm_stores’ );
      remove_shortcode( ‘wcfm_store_hours’ );
      }
      // —————-
      4. disable all endpoint begin with /store/ and /vendor-groups/ links.
      //diable wcfm endpoints : store, vendor-groups
      // —————-
      $current_url = ( is_ssl() ? ‘https://’ : ‘http://’ ) . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’];
      if( stripos($current_url, home_url(‘store/’)) === 0 or stripos($current_url, home_url(‘vendor-groups/’)) === 0 ) {
      if ( wp_redirect( home_url() ) ) {
      exit;
      }
      }
      // —————-
      hope it is useful for you and another b2b users.

    • #92242
      system
      Participant

      plus last post :
      not use wild domain settings in your wordpress site.
      you need add all available domains in your wordpress site(like: domain.com http://www.domain.com sub.domain.com) to the $current_url conditions.
      if some domains pass the condition ( stripos($current_url, home_url(‘vendor-groups/’)) === 0 ) , the code will be useless!

Viewing 7 reply threads
  • The topic ‘how to disable (or make private) vendor-groups page’ is closed to new replies.