Categories
WooCommerce

WooCommerce Product Page Customization

Display product variations under the price instead of in the “additional info” tab:

add_filter( 'woocommerce_product_tabs', 'condless_remove_additional_information_tab', 100, 1 );
function condless_remove_additional_information_tab( $tabs ) {
	unset( $tabs['additional_information'] );
	return $tabs;
}

add_action( 'woocommerce_single_product_summary', 'condless_additional_info_under_add_to_cart', 7 );
function condless_additional_info_under_add_to_cart() {
	global $product;
	if ( $product && ( $product->has_attributes() || apply_filters( 'wc_product_enable_dimensions_display', $product->has_weight() || $product->has_dimensions() ) ) ) {
		wc_display_product_attributes( $product );
	}
}

Leave a Reply

Your email address will not be published. Required fields are marked *