M
M
Maxim Tyulpakov2019-01-30 16:06:33
WordPress
Maxim Tyulpakov, 2019-01-30 16:06:33

How to return the "default" woocommerce display of the product price in case the price is not specified?

There is an active online store, in which, in the absence of a price for the goods, the button "ON ORDER" was displayed.
In functinon.php, my daughter found:

add_filter('woocommerce_empty_price_html', 'empty_price_message');
function empty_price_message() {
  return 'Под заказ';
}

Most likely this code worked. So now it has stopped working. As a result, now those products that do not have a price show a price of 0 rubles, and there are no messages "On order" in everything. There is a newly customizable store, everything is fine in it. Those. if the price is not specified, then there is no price, no basket button ...
I understand that there is little incoming data, but you never know. Can you just tell me where to look?
woocommerc, wordpress and all latest plugins.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Tyulpakov, 2019-01-30
@MaXComp

I found it myself. The plugin - Woo Discount Rules introduced such a bug when updating.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question