1
votes

I am using WooCommerce 2.1x. I want a reposition of the WooCommerce tabs in product detail.

I already made child templates. I only cannot find the place where I actually change the pattern of items within the content-single-product.php

I want to display the tab after the image, before the product summary part. How do I do that?

2

2 Answers

5
votes

Remove the default woocommerce add_action for the tabs :

remove_action( 'woocommerce_after_single_product_summary',woocommerce_output_product_data_tabs', 10 );

Now add a new add_action to hook in the tabs where you want. in this case you want it to appear before summary part and after image, add this :

add_action( 'woocommerce_before_single_product_summary','woocommerce_output_product_data_tabs', 30 );

See that we have added a priority of 30 as Product images are hooked at priority 20 and we want tabs to appear after the product Images.

You should also consider the answer provided by -Aibrean as that will help you in future.

2
votes

The actions list is on

woocommerce / includes / wc-template-hooks.php

The best way to reorder/change pattern is through removing action/filter and adding in your own functions file. That way you can keep it intact even if Woo updates.

WooCommerce Product Template This might be helpful as I've shown how to deconstruct and re-order from one summary area to another.