Answer the question
In order to leave comments, you need to log in
How to display add to cart button in woocomerce?
What to do please tell me
Answer the question
In order to leave comments, you need to log in
If displayed simply on the page, then with the shortcode [add_to_cart id="product_id" ].
I hope you find it yourself.
And if you display in a loop, then
<div class="add-to-cart ">
<a href="<?php echo $product->add_to_cart_url(); ?>" class="cart">
<span class="add-to-cart-content">Добавить в корзину</span>
</a>
</div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question