I have woocommerce, single product page, the variational product with two variations. If some of them (or none) are not checked, the Add to cart button is disabled and I have an alert with the message. As I understood it is a function woocommerce_add_to_cart_validation. I need to disable the alert message and show this error message before cart quantity and Add to cart button. As I understood, this is a woocommerce_before_add_to_cart_button. How can I do this?
I found a few solutions on how to customize the behavior, but I didn't found how to hide an alert message.
UPDATE
I'm talking about JS alert which appears when you push Add to cart button but with invalid variation form. For example, I have a product with size and color. I chose color but forget to pick a size. Add to cart button is disabled, and if I push it the JS alert appears with the message, that I need to complete the form. I want to hide this JS alert pop-up and place custom error message before add_to_cart_button block.