Sorting products by price ( regular + sale price )

When your are updating your product regular price is saved to _regular_price and sale price is saved to _sale_price meta_key. Also WooCommerce will figure out which is the current price sale or regular and will save it to _price meta_key. There is no need to sort products by two _regular_price and _sale_price meta_keys. Your current prices should be stored in _price meta_key and this key should be used to sort products by price.

Try to investigate your SQL $query->request and database records to figure this out.

Keep in mind that if your sale price is scheduled you have to make sure that WooCommerce cron jobs are working correctly to update _price meta_key.

tech