• Resolved elparts

    (@elparts)


    Hi,

    I know I can set priorities of tabs directly in tab, but I have snippet like below, and I would like to set it there. (I hope it overrides tab settings). What are names for your tabs?

    If I have a separate tab for each product, and a global tab, then they will be named differently? Can I check by myself somehow what is a name for a tab?

    add_filter( ‘woocommerce_product_tabs’, ‘woo_reorder_tabs’, 98 );
    function woo_reorder_tabs( $tabs ) {

    $tabs[‘reviews’][‘priority’] = 4;
    $tabs[‘description’][‘priority’] = 1;
    $tabs[‘additional_information’][‘priority’] = 3;

    return $tabs;
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author YITHEMES

    (@yithemes)

    Hello,
    you can do a var_dump of $tabs to discover what are the tabs registered.

    add_filter( ‘woocommerce_product_tabs’, ‘woo_reorder_tabs’, 98 );
    function woo_reorder_tabs( $tabs ) {
     var_dump( $tabs );
     $tabs[‘reviews’][‘priority’] = 4;
     $tabs[‘description’][‘priority’] = 1;
     $tabs[‘additional_information’][‘priority’] = 3;
    
     return $tabs;
    }

    refresh the single product page and you will see the tabs and the names.

    Thread Starter elparts

    (@elparts)

    Thank you for your help !

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘What are names for tabs?’ is closed to new replies.