harryb
April 25, 2023, 1:42pm
1
Browser : Chrome 110
OS : macOS
I’m using an Extra Product Options plugin for Woocommerce but the options are not displaying.
The plugin requires the following hooks in the Single Product Template:
woocommerce_before_single_product
woocommerce_before_add_to_cart_button or woocommerce_after_add_to_cart_button
Are these hooks missing in the Bricks single product template?
harryb
April 25, 2023, 3:16pm
2
Hopefully this will be helpful to someone else with the same problem: you need to add a do_action tag to insert the hook.
In this case I added a code block at the bottom of the template and added:
{do_action:woocommerce_before_single_product}
You do not need to even execute the code by the looks of it as it works with or without switching the Execute code toggle.
It would appear that woocommerce_before_add_to_cart_button or woocommerce_after_add_to_cart_button are not supported as those did not work.
1 Like
Thanks for posting this. I added the {do_action:woocommerce_before_single_product} to the template in a code element but the options are still not rendering.
I’ve also tried woocommerce_before_single_product, woocommerce_before_add_to_cart_button and woocommerce_after_add_to_cart_button
Do you have any guidance on implementing this? Many Thanks.
harryb
March 8, 2024, 2:37pm
4
Hi - try adding the do_action in a basic text element. I understand that is the intended method.
1 Like
And magically they appear! Thank you for your help!
1 Like