Answer the question
In order to leave comments, you need to log in
How to add a duplicate button to the cart?
I have a WordPress site with WooCommerce.
I want to make a buy button sticky at the bottom of the page in the product card.
I thought that you can do it with a hook, display a duplicate of the button and stick it at the bottom using css.
I use it
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_add_to_cart', 20);
but the duplicate does not appear, add_action( 'after_setup_theme', 'lets_add_cart_button' );
function lets_add_cart_button() {
add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 20 );
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question