Woocommerce: How to reorder single page hooks?
woocommerce
Solution
This was so long ago but in case anyone is interested, in functions.php file remove and add your own action to reorder contents of single product summary:
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40);
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 5 );
Problem
I'm working on a Woocommerce-based site and now I'm on the single page. My doubt is how to reorder some hooks there. Originally, we have this order (priority): ``` <?php /* * @hooked woocommerce_template_single_title - 5 * @hooked woocommerce_template_single_price - 10 * @hooked woocommerce_template_single_excerpt - 20 * @hooked woocommerce_template_single_add_to_cart - 30 * @hooked woocommerce_template_single_meta - 40 * @hooked woocommerce_template_single_sharing - 50 */ ?> ``` According to my layout, I need to put the elements on this exactly order: ``` 1: Title 2: Name of the product category (last level category where that product was classified in the admin) 3: Quantity switch and "add to cart" button 4 and last: Description ``` How can I redefine this on my "functions" file in my theme? Any ideas?