set_sale_price in WooCommerce [closed]

Thanks to a colleague at codeable I was able to solve this by saving the product after setting the sale price:

$editedProduct->save();

Simple as that. If only I’d known that 6 hours ago!

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)