我如何将最后一个值存储$total['value']
到$COD
?
变量和回显它和页面代码的其他地方是
<?php foreach( $wpo_wcpdf->get_woocommerce_totals() as $key => $total ) : ?>
<tr class="<?php echo $key; ?>">
<td class="no-borders"> </td>
<th class="description"><?php echo $total['label']; ?></th>
<td class="price"><span class="totals-price"><?php echo $total['value']; ?></span></td>
</tr>
<?php endforeach; ?>
“WooCommerce PDF Invoices & Packing Slips”免费插件的代码