Thank you nmerii for your response. The event is triggering and works good!
One last querstion. During “Add to cart” i am using “woocommerce_add_to_cart_validation” filter and on my case i don’t allow wishlist item to be added to cart, so i return wc_add_notice(‘Custom Error.’).
add_filter( ‘woocommerce_add_to_cart_validation’, function($passed, $product_id, $quantity){
$custom_logic = true;
if($custom_logic) {
wc_add_notice( __(‘Custom Error.’, ‘woo’ ), ‘error’ );
return false;
}
return $passed;
}, 10, 3 );
On “nmgr_add_to_cart_response” response object, i don’t see that error message to display it on my custom header info. The response.fragments.notice is undefined.