e, no updates needed in this case. * 2. If there are changes already queued for order object, then we don't need to update the modified date as it will be updated ina subsequent save() call. * * @param WC_Order $order Order object. * @param \WC_Meta_Data|null $meta Metadata object. * * @return bool Whether the modified date needs to be updated. */ private function should_save_after_meta_change( $order, $meta = null ) { $current_time = $this->legacy_proxy->call_function( 'current_time', 'mysql', 1 ); $current_date_time = new \WC_DateTime( $current_time, new \DateTimeZone( 'GMT' ) ); $should_save = $order->get_date_modified() < $current_date_time && empty( $order->get_changes() ) && ( ! is_object( $meta ) || ! in_array( $meta->key, $this->ephemeral_meta_keys, true ) ); /** * Allows code to skip a full order save() when metadata is changed. * * @since 8.8.0 * * @param bool $should_save Whether to trigger a full save after metadata is changed. */ return apply_filters( 'woocommerce_orders_table_datastore_should_save_after_meta_change', $should_save ); } } 1mp - Ngân Vũ Telecom
Thương hiệu
EZVIZ
Thương hiệu
EZVIZ