Hey,
I tried to use this filter in functions.php to start reordering single product tabs :
/**
* Reorder product data tabs
*/
add_filter( 'woocommerce_product_tabs', 'woo_reorder_tabs', 98 );
function woo_reorder_tabs( $tabs ) {
$tabs['reviews']['priority'] = 5; // Reviews first
$tabs['description']['priority'] = 10; // Description second
$tabs['additional_information']['priority'] = 15; // Additional information third
return $tabs;
}
But it returns some errors:
Notice : Undefined index: title in /home/xxx/public_html/xxx/wp-content/themes/pro/woocommerce/single-product/tabs/tabs.php on line 49
Notice : Undefined index: callback in /home/xxx/public_html/xxx/wp-content/themes/pro/woocommerce/single-product/tabs/tabs.php on line 55
Warning : call_user_func() expects parameter 1 to be a valid callback, no array or string given in /home/xxx/public_html/xxx/wp-content/themes/pro/woocommerce/single-product/tabs/tabs.php on line 5
What can I do for adding a filter without any conflict?
Thanks in advance.