Fix coffee list rotation
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
3wc 2024-07-05 19:01:24 -04:00
parent 0852986599
commit e7f5673a19
2 changed files with 2 additions and 4 deletions

View File

@ -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;
}

View File

@ -118,8 +118,6 @@ if(!is_user_logged_in()){
<body>
<div class="container">
<?php
$j = 0;
foreach ($_GET["order_ids"] as $order_id) {
$order = wc_get_order($order_id);
$first_name = $order->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