Woocommerce 8.6.1 checkout form hooks not fired

103 Views Asked by At

I've installed Woocommerce 8.6.1 on Wordpress 6.4.3. My goal is to create a php plugin to customize the checkout page by adding information below the box where the product prices are summarized. To achieve this, I added a test function linked to the "woocommerce_checkout_order_review" hook

add_action( 'woocommerce_checkout_order_review', 'test', 10 );

plugin programma is correctly saved in "C:\xampp\htdocs\wordpress\wp-content\plugins\pluginame\ folder.

However, in every case, this function (test) is not invoked, as if the "woocommerce_checkout_order_review" hook is not being executed.

I also tried using the "woocommerce_review_order_after_shipping" hook, but again, nothing happens in this case either.

add_action( 'woocommerce_review_order_after_shipping', 'test', 10 );

I'm quite new to using WooCommerce, do you have any suggestions?

1

There are 1 best solutions below

1
Shameem Reza On

It seems like you are using the checkout block. Try switching to classic block or checkout shortcode; and then that action should work as expected.

[woocommerce_checkout]