D
D
Dmitry Vasechka2017-08-07 00:56:48
WordPress
Dmitry Vasechka, 2017-08-07 00:56:48

How to display upsells on woocommerce product page?

Good day! It is necessary to display upsells on the product page. How can I do that. Googled but didn't find anything :( MB googled badly...6895911c20584b2ab05e76edb3fd28d7.jpg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
WordPress WooCommerce, 2017-08-07
@MusicDeveloper

Through a hook or inside the template, insert a code that will pull out a list of products.
A list of product IDs can be obtained using the get_upsell_ids() method on the WC_Product object.
Further we do foreach and it is beautifully deduced as it would be desirable.

V
Vladimir Kulikov, 2021-02-05
@it_proger29

Would this feature work?woocommerce_upsell_display();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question