NO BUG: WooCommerce Add To Cart, not firing standard hooks?

Hey Guys,

I’m using " WooCommerce Extra Product Options Pro" to add extra options to products. It works perfectly with WooCommerce templates. As soon as I use a “Single” template for “Products” it stops working.

The developer is indicating that it is a Bricks issue, not firing the standard Woo hooks. See below.

Developer response

Our plugin follows the WooCommerce standards, hence it’s supposed to work fine with other plugins that are following WooCommerce standards as well.

Further, we are passing our fields and its values to the below hooks :

  1. woocommerce_before_single_product
  2. woocommerce_before_add_to_cart_button or woocommerce_after_add_to_cart_button

If the above hooks are available in the “single product page template" from custom theme then the extra fields will be displayed in that location.

I assumed that adding the “Add to Cart” Element it would fire the hooks. woocommerce_before_add_to_cart_button or woocommerce_after_add_to_cart_button

So, is this a Bricks issue ??

Hi @alanblair ,

Please may I know did you placed those template hooks on your single product template?
Kindly refer to this article.


Thanks, Jen,
I realized after raising this ticket that the plugin uses the hook ‘woocommerce_before_single_product’ by default. This is why it doesn’t work by simply adding the Add to Cart button widget.

I just added a code block to resolve it,

<?php /* Needed to get fields from WooCommerce Extra Product Options Pro*/ do_action('woocommerce_before_single_product'); ?>

Yeap, execute do_action in code element and dynamic tag {do_action} are both working the same.

I marked this thread as NO BUG now.

Thank you.