This commit is contained in:
parent
dfdf13cf6f
commit
cd14c04689
@ -189,6 +189,16 @@ if(!is_user_logged_in()){
|
|||||||
$product_name = $coffee->post_title;
|
$product_name = $coffee->post_title;
|
||||||
$roast = get_field("roast_level", $coffee->ID);
|
$roast = get_field("roast_level", $coffee->ID);
|
||||||
$is_organic = get_field("is_organic", $coffee->ID);
|
$is_organic = get_field("is_organic", $coffee->ID);
|
||||||
|
|
||||||
|
if (is_object($coffee)) {
|
||||||
|
$product_name = $coffee->post_title;
|
||||||
|
$roast = get_field("roast_level", $coffee->ID);
|
||||||
|
$is_organic = get_field("is_organic", $coffee->ID);
|
||||||
|
} else {
|
||||||
|
// Handle the case where $coffee is not an object
|
||||||
|
error_log("Error: \$coffee is not an object in template-order-label.php");
|
||||||
|
// Set default values or skip this iteration
|
||||||
|
}
|
||||||
} ?>
|
} ?>
|
||||||
<div class="label">
|
<div class="label">
|
||||||
<div>
|
<div>
|
||||||
|
Loading…
Reference in New Issue
Block a user