I am using the WooCommerce plugin. I created a sale page and use [sale_products]
shortcode of WooCommerce. It shows me all sales product perfectly, now I want that if there are no sale products, the message will be show "there is no sale product".
Like this:
if(!empty([sale_products])) {
[sale_products]
} else {
// message
}
Is there any way to handle this?
$output = do_shortcode('[sale_products]');
if($output !== '') {
[sale_products]
}