Answer the question
In order to leave comments, you need to log in
How to change the functionality of the add to cart button?
Lord! I understand that I’m probably not the first to ask such a question, but I didn’t find something. The bottom line:
how, when you click Add to Cart in wokmmers, call a pop-up window, or rather a feedback form, contact form for example.
Answer the question
In order to leave comments, you need to log in
# отключаете стандартные кнопки
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart');
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
# подключаете свои
remove_action( 'woocommerce_after_shop_loop_item', 'my_btn_to_cart');
remove_action( 'woocommerce_single_product_summary', 'my_btn_to_cart', 30 );
my_btn_to_cart()
connect your button, on which you hang what you want
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question