I am writing a simple plugin which updates meta values for woocommerce products. Did some good research and worked on it, got 90% of what I wanted, a simple process is missing though. Let me explain the issue with a simple example.
Product A with Variations
-------------------------------------- variations: 500 gms | 1 kg | 2 kg -------------------------------------- Regular Price: 100 | 200 | 400 -------------------------------------- Sale Price : 90 | 180 | 360
Now I am using the function update_post_meta to update the prices from my plugin. It works perfectly for filled values, but let say if we don't want to use that variation and make both values (sale price and regular price) blank and do the same process,database values updated blank but in display it shows 0 value.
Where as If we make blank value from product edit page Wordpress, it works as expected.
Can anybody please tell me what I am missing here ?