Tagged: woocommerce
-
AuthorPosts
-
May 6, 2022 at 7:15 pm #1350830
Hi there
I’ve been trying to reorder the single product page in Woocommerce but it appears that Enfold is stopping changes made to webhooks.
Can someone take a look?
These are the hooks that need changing:
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_rating’, 10);
add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_rating’ , 40);remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_price’, 10);
add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_price’, 40);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’, 50);remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_meta’, 40);
add_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_meta’, 30);May 9, 2022 at 5:34 am #1350983Hey Silvio,
Thank you for the inquiry.
Where are you testing this modification? Please provide the site URL in the private field so that we can check the changes.
You may need to wrap the hooks inside the woocommerce_before_single_product hook to override the modifications made by the theme.
add_action('woocommerce_before_single_product', 'avia_woocommerce_new_hooks_mod'); function avia_woocommerce_new_hooks_mod() { // your hooks here }
You can find the plugin configuration in the enfold > config-woocommerce > config.php file.
Best regards,
IsmaelMay 9, 2022 at 12:02 pm #1351037This reply has been marked as private.May 10, 2022 at 6:10 am #1351098Hi,
Thank you for the update.
You can move your own custom hooks inside the avia_woocommerce_new_hooks_mod function that we provided above. Place the code in the functions.php file. This should override the default template hooks in the theme.
Best regards,
IsmaelMay 10, 2022 at 11:15 am #1351142Thanks, this doesn’t do anything…
May 14, 2022 at 9:10 pm #1351803Hi,
Thank you for your patience, to move the price and add to cart button below the tabs on a single product page I tested this function on my demo site:add_action('woocommerce_before_single_product', 'avia_woocommerce_new_hooks_mod'); function avia_woocommerce_new_hooks_mod() { remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10); add_action( 'woocommerce_after_single_product_summary', 'woocommerce_template_single_price', 2); remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30); add_action( 'woocommerce_after_single_product_summary', 'woocommerce_template_single_add_to_cart', 3); }
this was the result:
I believe this is what you were asking for, I also tested this on your single product page with similar results, please see the screenshot in the Private Content area.
I didn’t leave this function in your child theme functions.php, so please add it and check.Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.