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

Fix get related order IDs method #624

Merged
merged 6 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
*** WooCommerce Subscriptions Core Changelog ***

= 7.2.0 - xxxx-xx-xx =
* Fix - Regenerate subscriptions related order caches (renewal, resubscribe, switch) if it's stored as an invalid value to prevent fatal errors.

= 7.1.2 - 2024-xx-xx =
* Update - Show "FREE" instead of 0 when there is no shipping cost in the recurring totals section of the Cart and Checkout blocks (requires WooCommerce 9.0+).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ public function get_related_order_ids_from_cache( $subscription, $relation_type

$meta_data = $this->get_related_order_metadata( $subscription, $relation_type );

return $meta_data ? maybe_unserialize( $meta_data->meta_value ) : '';
$related_orders = $meta_data ? maybe_unserialize( $meta_data->meta_value ) : '';

return is_array( $related_orders ) ? $related_orders : '';
}

/**
Expand Down
Loading