Product needs update by button to show dates
-
Hello,
I am setting the sale price and dates of sale price with this code snippet:$product = wc_get_product($post_id); if ( !is_wp_error( $product ) ) { $product->set_sale_price( $c->Price ); $product->set_date_on_sale_from( date( 'Y-m-d 00:00:00', strtotime($c->FromDate)) ); $product->set_date_on_sale_to( date( 'Y-m-d 23:59:59', strtotime($c->FinalDate)) ); } $product->save();But the problem is that timers are not showing unless I click the Update button in Woocommerce back end manually. Why is that?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Product needs update by button to show dates’ is closed to new replies.