First of all, sorry for this title, I tried my best to describe it.
I'm trying to override the WordPress' function wc_get_product_ids_on_sale() because one of my plugin is creating _sale_price even if it's the same than price.
I'd to know, how can I get only post_id which has :
- _sale_price different from _price
- _sale_price not empty
I only know how to get empty...
SELECT post_id FROM wp_postmeta
WHERE meta_key = '_sale_price'
AND meta_value <> ''
Do you have any ideas ?