How to add a custom tab for single product tabs in woocommerce wordpress

For add a custom tab in single product page tabs just copy and paste below code into your theme's functions.php file

add_filter( 'woocommerce_product_tabs', 'rj_single_product_additional_tab' );
function rj_single_product_additional_tab( $tabs ) {
$tabs['additional_info'] = array(
'title' => __( 'Additional Info', 'woocommerce' ),
'priority' => 1,
'callback' => 'rj_single_product_additional_tab_callback'
);

return $tabs;

}
function rj_single_product_additional_tab_callback() {

global $post,$product,$wpdb;
// your display content here
}

Comments

Popular posts from this blog

How to add image option in nav menu in wordpress

How to add a custom email functionality in woocommerce,wordpress for example new email template for shipping order

How to change user id on checkout page for assign order to different user in woocommerce wordpress