- This topic has 2 replies, 2 voices, and was last updated 2 years, 3 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- The forum ‘Azuma’ is closed to new topics and replies.
I am trying to use a plug-in to assist with bookable products, but the date boxes do not appear.
The plug-in’s vendor suggested this could be due to missing “action hook from WooCommerce templates”, particularly for ‘woocommerce_before_add_to_cart_button’.
Can I insert this manually?
Hi, the woocommerce_before_add_to_cart_button
action hook is present in the theme, or to be technically accurate this action hook is present in the WooCommerce cart templates and the Azuma theme does not remove it.
If this hook is missing in your setup, possible causes could be another plugin that is removing/modifying it, or if you have modified the theme or changed something in a child theme. I don’t know if any of these apply in your case but it may be worth looking into.
You can test that the woocommerce_before_add_to_cart_button
action hook is working by adding this code to the theme’s functions.php
file:
function azuma_my_test_callback() {
echo '<p>JUST A TEST</p>';
}
add_action( 'woocommerce_before_add_to_cart_button', 'azuma_my_test_callback' );
With this code you should see the “JUST A TEST” paragraph just before the add-to-cart section on single product pages, and with this test I was able to confirm that the action hook works correctly with the latest version of the Azuma theme and the latest version of the WooCommerce plugin.
Hello, did you find out what was the issue with the plugin you are using?