• Resolved bigcheef

    (@bigcheef)


    I used this provided snippet. it works but only allows me to add one tab. I am attempting to add multiple tabs to no prevail. adding a 2nd snippet replaces the original, im stuck

    add_filter('dokan_store_tabs', function($tabs, $store_id) {
        $tabs['new-tab'] = array(
                'title' => __( 'New Tab', 'dokan' ),
                'url'   => dokan_get_store_url( $store_id )
            );
    
        return $tabs;
    }, 100, 2);
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello @bigcheef,

    You can easily add multiple tab but you have to write the code like below example:

    add_filter('dokan_store_tabs', function($tabs, $store_id) {
    
     $tabs = [
            'products' => [
                'title' => __( 'Products', 'dokan-lite' ),
                'url'   => dokan_get_store_url( $store_id ),
            ],
            'terms_and_conditions' => [
                'title' => __( 'Terms and Conditions', 'dokan-lite' ),
                'url'   => dokan_get_toc_url( $store_id ),
            ],
        ];
      return $tabs;
    }, 100, 2);

    Thanks!

    Shafinoid

    (@shafinahmad01)

    Hello,
    I believe you are doing well,

    As you haven’t replied for a long, I’m considering that you have got the solution and I’m also resolving this topic.

    But feel free to create another one anytime.

    Stay Safe ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add multiple vendor tabs’ is closed to new replies.