O
O
ololoshka12020-08-03 13:54:22
WooCommerce
ololoshka1, 2020-08-03 13:54:22

How to add sale inscription when WooCommercy prices go down?

How to add sale inscription when WooCommercy prices go down?

screen
5f27ecd18e3af821266614.png


Also, after installation, for some reason I have it in English, how to change it to Russian?)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
ololoshka1, 2020-08-03
@ololoshka1

And that's all I did)
if( $product->is_on_sale() ) {
echo 'Sale!';
}else{
echo '';
}
Earned.
in function.php
cea with and without discount
function the_dramatist_price_show() {
global $product;
if( $product->is_on_sale() ) {
return $product->get_sale_price();
}
return $product->get_regular_price();
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question