Created
May 20, 2017 19:31
-
-
Save eder-dias/5817b9dd76f3405b64824ae0cbe34f50 to your computer and use it in GitHub Desktop.
Move add to cart button above the description [Woocommerce]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* woocommerce_single_product_summary hook | |
* | |
* @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 | |
*/ | |
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30); | |
add_action('woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 15); |
it works, thanks!
Elegant, thanks!
Thank you for sharing this!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Didn't work for me. One gets added to the top and the bottom one doesn't get removed.