Further fix to array handling
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
3wc 2024-07-09 14:30:08 -04:00
parent 83be51bf32
commit 70886ea67d

View File

@ -152,7 +152,7 @@ function action_wcs_renewal_order_created($order, $subscription)
$order_coffees = [];
$seen_subscriptions = [];
if ($last_order_coffees !== false) {
if ($last_order_coffees) { // Check last_order_coffees isn't null or false
// Get the latest coffee seen in each coffee list from the previous order
foreach (array_reverse($last_order_coffees) as $last_order_coffee) {
if (