I am trying to add a custom tab to Woocommerce Product ; I have tried with this code snippet in functions.php :
add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab' );
function woo_new_product_tab( $tabs ) {
// Adds the new tab
$tabs['desc_tab'] = array(
'title' => __( 'Additional Informationsss', 'woocommerce' ),
'callback' => 'woo_new_product_tab_content'
);
}
function woo_new_product_tab_content() {
// The new tab content
echo '<p>Lorem Ipsum</p>';
}
But it is showing this error :
Notice: Function woocommerce_sort_product_tabs() expects an array as the first parameter. Defaulting to empty array
Do anyone has encountered this error before or have an idea how to deal with it ?
Thanks in advance
return $tabs
after apending new tab array