I have a Script that uploads/updates products into my WooCommerce website programmatically from of a JSON file.
Script is used to update product variations as well.
I am using Wordpress's built-in functions to insert/update POSTS or POSTS_METAS
Everything is working perfectly, I can see variant prices are being updated fine.
But only thing that is not working is the price range displayed under title of a product
This range is actually the
lowest price of a variant - highest price of a variant
It only gets updated if I press the blue colored "UPDATE
" button from admin area.
I also tried doing(after inserting/updating all variants)
wp_update_post(array(
'ID' => $post_id,
'post_status' => 'publish'
));
But had no luck.