• Resolved willpower1

    (@willpower1)


    Hi all.
    I have this code that I have adpted from the Woo themes documentation.

    /////Tabs order
    add_filter( 'woocommerce_product_tabs', 'woo_reorder_tabs', 98 );
    function woo_reorder_tabs( $tabs ) {
    
    $tabs['tab-custom-tab-first']['priority'] = 5; // First
    $tabs['tab-vendor']['priority'] = 10; // Second
    $tabs['tab-additional_information']['priority'] = 15;// Third
    $tabs['tab-reviews']['priority'] = 20; // Fourth
    
    return $tabs;
    }

    Here’s my page
    https://www.thewattletree.com/product/emmelle-candles/
    When I place the code on line it gives up errors.
    Can anyone help with this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter willpower1

    (@willpower1)

    Ok I have made some progress with editied code.

    /////Tabs order
    add_filter( 'woocommerce_product_tabs', 'woo_reorder_tabs', 98 );
    function woo_reorder_tabs( $tabs ) {
    
    $tabs['custom-tab-first']['priority'] = 5; // First
    $tabs['vendor']['priority'] = 10; // Second
    $tabs['additional_information']['priority'] = 15;// Third
    $tabs['reviews']['priority'] = 20; // Fourth
    
    return $tabs;
    }

    But I notice the reviews tab being last in order actually is displayed first upon the page loading. Can that be changed?

    Thread Starter willpower1

    (@willpower1)

    Nevermind. the code I was using was causing upload image errors so I’ve dumped it and bought a $100 pluggin .

    Hi ADM,

    I’m trying to do the same thing in my child theme, and as per instructions here:
    https://docs.woothemes.com/document/editing-product-data-tabs/
    but i’m also having problems.

    The editing is being done in the template function.php file.

    Changing the order with just 3 tabs seems to work fine but not with 4 tabs, which is what you also have.

    What plugin did you buy to resolve this issue?

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to change the product tab order’ is closed to new replies.