A
A
Alexander Burykhin2019-11-13 19:33:48
Layout
Alexander Burykhin, 2019-11-13 19:33:48

How to connect woocommerce templates?

There is a layout of its own layout of the product card, which needs to be stretched. But, at the same time, the price, description, picture and title are in one div.
And WooCommerce has its own templates for displaying each detail. How can they be combined into one div so that they retain their positioning as in the layout?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Klepko, 2019-11-14
@Lord_Bobr

There are many functions in woocommerce, in extreme cases, you can pull everything out of postmeta.
Functions can be viewed here https://docs.woocommerce.com/wc-apidocs/class-WC_P...
It is done like this:

$pr = wc_get_product();
echo $pr->get_short_description();
echo $pr->get_regular_price();
echo $pr->get_sale_price();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question