I’ve been dealing with an issue related to woocommerce validation specifically when using the woocommerce_add_to_cart_validation hook.
The issue is whenever I pass $passed = false within the hook, the banner with the error isn’t shown until the user goes to the cart page.
The code in which I’m doing that in is in functions.php file in the child theme.