Woocommerce

Add Content Before and After WooCommerce Additional Information Tab

By October 13, 2020No Comments

Drop this into functions.php to add content above and below the additional info tab in WooCommerce!

add_filter( 'woocommerce_product_tabs', 'woo_rename_tabs', 98 );
function woo_rename_tabs( $tabs ) {
    global $product;
    $tabs['additional_information']['callback'] = 'custom_function_name'; // this is the function name which is included below
    return $tabs;
}

function custom_function_name(){
	echo 'New Content Here'; //add anything you want to show before the default tab content
	woocommerce_product_additional_information_tab(); // This function calls  wc_get_template( 'single-product/tabs/additional-information.php' );
	echo 'New Content Here'; //add anything you want to show after the default tab content
}

Borrowed from https://gist.github.com/ben-heath/9f29c5a6c0b65d174dce14af1792bd40

Contact us to learn about adopting the web for your business

Jarod Thornton

Author Jarod Thornton

More posts by Jarod Thornton