• Resolved tanya_m

    (@tanya_m)


    Hi Amin,

    I love this plug-in, so thank you for creating it! I am hoping you can help with one thing. When I use the plugin, the Product Specifications tab comes before the Description tab and I want the Description to remain the first tab.

    I found the following in your plugin file:

    /**
    * Add tables to woocommerce tabs
    */
    public function woocommerce_tabs( $tabs ){
    $tabs[‘dw_product_specifications’] = array(
    ‘title’ => __( ‘Product specifications’, ‘dwspecs’ ),
    ‘priority’ => 10,
    ‘callback’ => array( $this, ‘woo_display_tab’ )
    );

    return $tabs;
    }

    If I change the priority to 25, it moves the tab after Description, which I want, but I don’t want to edit your file as future plugin updates will delete my change. When I copied the above code and moved it to my functions.php (I am using a Genesis theme) the plugin still overrode it. Can you help me with the proper code for me to put in functions.php that will override the plugin? I really appreciate the help!

Viewing 1 replies (of 1 total)
  • Plugin Author Dornaweb

    (@dornaweb)

    Hi, I’m glad that you like the plugin.
    You could do this by adding the following code to functions.php :

    
    add_filter( 'woocommerce_product_tabs', 'my_customized_woocommerce_tabs', 99 );
    function my_customized_woocommerce_tabs( $tabs ){
    	$tabs['dw_product_specifications']['priority'] = 25;
    
    	return $tabs;
    }
    

    But i think it’s my mistake for making priority set to 10, I will fix it in the next update.for now you can just use the above code.

    • This reply was modified 9 years, 2 months ago by Dornaweb.
Viewing 1 replies (of 1 total)

The topic ‘Move Product Specifications Tab After Description’ is closed to new replies.