N
N
ne4haev2021-02-03 01:57:32
WordPress
ne4haev, 2021-02-03 01:57:32

How to display the weight of a product in Woocommerce in the product card?

Good day.

WP experts, please tell me how to display the weight of the product so that it is not displayed in the "details" when you go to the product itself, but is displayed initially in all products. (The arrow showed in the screenshot where I need to display the weight of the goods).

6019d8641ea9e016566031.png

Now the weight is displayed only when you fully open the product, in detail.
6019d8cce3aee553120982.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
trenton, 2021-02-05
@ne4haev

This is a meta field. To tear it out into the archive, you must first refer to the global $product, then, by analogy, insert the cards in the right place with the necessary hook.
https://docs.woocommerce.com/document/display-prod...

O
Oleg, 2021-02-03
@politon

https://woocommerce.github.io/code-reference/files...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question