Created the `woocommerce_get_product_ids_on_sale()` function

Keeps things DRY.