add_filter('woocommerce_get_price_html', 'ocultar_precio_sin_existencias', 10, 2);
function ocultar_precio_sin_existencias($price, $product) {
if (!$product->is_in_stock()) {
return '';
}
return $price;
}
hola
Cgk8ZGl2IGNsYXNzPSJmb290ZXJfc3VzY3JpYmV0ZSIgc3R5bGU9IiI+CgkJPHAgc3R5bGU9ImNvbG9yOiMwMDA7IGZvbnQtd2VpZ2h0OjYwMDsgbGluZS1oZWlnaHQ6IDEuMjVyZW07IG1hcmdpbjogMDsiPlF1aWVybyByZWNpYmlyIGxhIHByb2dyYW1hY2nDs24gZGUgbGEgRnVuZGFjacOzbiBDYW5hbDwvcD4KCQk8cCBzdHlsZT0iY29sb3I6IzAwMDsgbWFyZ2luLWJvdHRvbToxMHB4OyI+KEFydGUsIGN1bHR1cmEsIG1lZGlvIGFtYmllbnRlIGUgaW5ub3ZhY2nDs24pPC9wPgoJCTxkaXYgY2xhc3M9ImZvb3Rlcl9mb3JtdWxhcmlvIj4KCQkJCjxkaXYgY2xhc3M9IndwY2Y3IG5vLWpzIiBpZD0id3BjZjctZjI2NjItbzEiIGxhbmc9ImVzLUVTIiBkaXI9Imx0ciI+CjxkaXYgY2xhc3M9InNjcmVlbi1yZWFkZXItcmVzcG9uc2UiPjxwIHJvbGU9InN0YXR1cyIgYXJpYS1saXZlPSJwb2xpdGUiIGFyaWEtYXRvbWljPSJ0cnVlIj48L3A+IDx1bD48L3VsPjwvZGl2Pgo8Zm9ybSBhY3Rpb249Ii90aWVuZGEvY2F0ZWdvcmlhLXByb2R1Y3RvL3B1YmxpY2FjaW9uZXMvI3dwY2Y3LWYyNjYyLW8xIiBtZXRob2Q9InBvc3QiIGNsYXNzPSJ3cGNmNy1mb3JtIGluaXQgbWFpbGNoaW1wLWV4dC0wLjUuNzIiIGFyaWEtbGFiZWw9IkZvcm11bGFyaW8gZGUgY29udGFjdG8iIG5vdmFsaWRhdGU9Im5vdmFsaWRhdGUiIGRhdGEtc3RhdHVzPSJpbml0Ij4KPGRpdiBzd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