Disable product tab in vendor page

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM Disable product tab in vendor page

Tagged: ,

This topic contains 2 replies, has 2 voices, and was last updated by Avatar Sarmistha Chakraborty 3 months, 2 weeks ago.

  • Author
    Posts
  • #76423
    Avatar
    diego
    Participant

    Hello,
    in the vendor store page, I want to disable the product tab and make the about tab the default.

    How should I do?

    I tried this code, but it doesn’t work as I want.

    add_filter( 'wcfmmp_store_tabs', function( $store_tabs, $store_id ) {
        if( isset( $store_tabs['products'] ) ) unset( $store_tabs['products'] );
        return $store_tabs;
    }, 50, 2 );

    Thanks a lot

  • #77068
    Avatar
    diego
    Participant

    up

    • #77441

      Hi,

      Try this code to hide the products tab on the vendor’s store page

      add_filter( 'wcfmmp_store_tabs', 'new_wcfmmp_store_tabs',90,2);
      function new_wcfmmp_store_tabs($store_tabs, $vendor_id) {
          unset($store_tabs['products']);
          return $store_tabs;
      }
      add_filter('wcfmp_store_default_query_vars',function($tab,$vendor_id){
         return 'about';   
      },20,2);

      Update the plugins(WCFM Marketplace) before adding this code.
      Let me know if it is ok.

      Thank You for your patience.

You must be logged in to reply to this topic.