Hi all. There is such a need in the Woocommerce shop, when the price is zero, that is, free goods, output its label. Doing such action
filter_woocommerce_empty_price_html function($price, $_product) { if ($_product->get_price() == 0) return __('Price check'); return $price; } add_filter( 'woocommerce_empty_price_html', 'filter_woocommerce_empty_price_html', 10, 2 );
but it works when prices do not, and such a product in the basket is not put. Already a head broke in 2 days. Who can tell me what I'm doing wrong.