Skip to content

Commit

Permalink
Fix/memberships/subscription end date format (#36838)
Browse files Browse the repository at this point in the history
* Memberships: use full date for abbreviated subscriptions

* changelog
  • Loading branch information
chrismccluskey authored Apr 12, 2024
1 parent ff17b59 commit 3e02270
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: other

Make the representation of the end date consistent in membership subscription abbreviation.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public static function abbreviate_subscriptions( $subscriptions_from_bd ) {
)
) {
$subscriptions[ $subscription['product_id'] ] = new \stdClass();
$subscriptions[ $subscription['product_id'] ]->end_date = empty( $subscription['end_date'] ) ? ( time() + 365 * 24 * 3600 ) : $subscription['end_date'];
$subscriptions[ $subscription['product_id'] ]->end_date = empty( $subscription['end_date'] ) ? gmdate( 'Y-m-d H:i:s', ( time() + 365 * 24 * 3600 ) ) : $subscription['end_date'];
}
}
return $subscriptions;
Expand Down

0 comments on commit 3e02270

Please sign in to comment.