Woocommerce Product page: move description and price
The default description and price positions are not fitting most of eShops. Here is the snippet, which will change the order like this:
- Title
- Long descriptions with removed tabs
- Short description
- Price
- Add to cart button
add_filter( 'woocommerce_product_tabs', function( $tabs ) {unset( $tabs['description'] ); return $tabs;});
add_action( 'woocommerce_single_product_summary', function() {the_content();} );
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_output_product_data_tabs', 20 );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 20 );