Fix problem with assignment in conditional

This commit is contained in:
Thomas Roberts 2021-11-26 15:40:52 +00:00
parent d0a5c6b998
commit cd9efe16c0
No known key found for this signature in database
GPG Key ID: 7C7EC4402EC08F35
1 changed files with 5 additions and 2 deletions

View File

@ -28,7 +28,10 @@ $hidden_order_itemmeta = apply_filters(
)
);
?><div class="view">
<?php if ( $meta_data = $item->get_formatted_meta_data( '' ) ) : ?>
<?php
$meta_data = $item->get_formatted_meta_data( '' );
if ( $meta_data ) :
?>
<table cellspacing="0" class="display_meta">
<?php
foreach ( $meta_data as $meta_id => $meta ) :
@ -47,7 +50,7 @@ $hidden_order_itemmeta = apply_filters(
<div class="edit" style="display: none;">
<table class="meta" cellspacing="0">
<tbody class="meta_items">
<?php if ( $meta_data = $item->get_formatted_meta_data( '' ) ) : ?>
<?php if ( $meta_data ) : ?>
<?php
foreach ( $meta_data as $meta_id => $meta ) :
if ( in_array( $meta->key, $hidden_order_itemmeta, true ) ) {