Answer the question
In order to leave comments, you need to log in
Why doesn't wc_product_class() work after updating WooCommerce?
I understand that this is not such a catastrophe, but still, the function that used to display classes for each product, it was convenient to cling to them and style everything, suddenly stops working. Do you also?
Answer the question
In order to leave comments, you need to log in
Yes, everything works as before.
The reason is not updated templates used themes.
You need to update the theme, or if the theme developer doesn't have an update yet, then manually fix the theme template files that use wc_product_class( ) .
For example, in the file, along the path:
\wp-content\themes \imya-temy\ woocommerce\content-product.php
replace
wc_product_class( );
на
wc_product_class( '', $product );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question