Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.

Commit 81c7c21

Browse files
committed
Reverted comment
1 parent ee936fb commit 81c7c21

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

includes/class-wc-subscriptions-renewal-order.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ public static function maybe_record_subscription_payment( $order_id, $orders_old
9696
$order_needed_payment = in_array( $orders_old_status, apply_filters( 'woocommerce_valid_order_statuses_for_payment', array( 'pending', 'on-hold', 'failed' ), $order ) );
9797

9898
if ( $order_completed && $order_needed_payment ) {
99+
// Prior to WC 3.0, we need to update the post date (i.e. the date created) to have a reliable representation of the paid date (both because it was in GMT and because it was always set). That's not needed in WC 3.0, but some plugins and store owners still rely on it being updated, so we want to make it possible to update it with 3.0 also.
99100
if ( apply_filters( 'wcs_renewal_order_payment_update_date_created', false, $order, $subscriptions ) ) {
100101
$order->set_date_created( time() );
101102
$order->save();

0 commit comments

Comments
 (0)