Add sale price programmatically to product variations
问题 I need to update the sale price programmatically, on variable product and all his variations. What kind of meta field do I need to add? I'm trying to update main product such as: update_post_meta($post_id, '_regular_price', '100'); update_post_meta($post_id, '_price', '50'); update_post_meta($post_id, '_sale_price', '50'); and then I update every single variations update_post_meta($variation_id, '_regular_price', '100'); update_post_meta($variation_id, '_price', '50'); update_post_meta(