From e7f5673a19590acb606c4a3c11dc302200e42809 Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Fri, 5 Jul 2024 19:01:24 -0400 Subject: [PATCH] Fix coffee list rotation --- wp-content/themes/mont58-coffee/functions.php | 2 +- wp-content/themes/mont58-coffee/template-order-label.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/wp-content/themes/mont58-coffee/functions.php b/wp-content/themes/mont58-coffee/functions.php index f44a8b1..29590df 100644 --- a/wp-content/themes/mont58-coffee/functions.php +++ b/wp-content/themes/mont58-coffee/functions.php @@ -166,7 +166,7 @@ function action_wcs_renewal_order_created($order, $subscription) $last_order_coffee["coffee"]->ID, $last_order_coffee["coffee_list"]->coffees ); - if (!$position_in_list) { + if ($position_in_list === false) { // ignore this, can't find it in list anymore continue; } diff --git a/wp-content/themes/mont58-coffee/template-order-label.php b/wp-content/themes/mont58-coffee/template-order-label.php index ed486ef..c320da9 100644 --- a/wp-content/themes/mont58-coffee/template-order-label.php +++ b/wp-content/themes/mont58-coffee/template-order-label.php @@ -118,8 +118,6 @@ if(!is_user_logged_in()){
get_billing_first_name(); @@ -132,7 +130,7 @@ if(!is_user_logged_in()){ $order_subscription_coffees = get_field("coffees", $order_id); - $j = 0; // Reset $j for each order (claude suggested this) + $j = 0; foreach ($items as $item) { // checking if product is a coffee