Use same precision as DB timezone to prevent unnecessary updates.

This commit is contained in:
Vedanshu Jain 2023-08-28 16:37:31 +05:30
parent aa08add6e3
commit d217819824
1 changed files with 1 additions and 1 deletions

View File

@ -2852,7 +2852,7 @@ CREATE TABLE $meta_table (
* @param \WC_Meta_Data $meta Metadata object.
*/
protected function after_meta_change( &$order, $meta ) {
$current_date_time = new \WC_DateTime( 'now', new \DateTimeZone( 'GMT' ) );
$current_date_time = new \WC_DateTime( current_time( 'mysql'), new \DateTimeZone( 'GMT' ) );
method_exists( $meta, 'apply_changes' ) && $meta->apply_changes();
$this->clear_caches( $order );