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?
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 );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With