Created
July 18, 2020 07:00
-
-
Save ginsterbusch/6eaf41835262c838f952dce7535b03ad to your computer and use it in GitHub Desktop.
Most useless incremental count ever ..
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* When looking into how to properly and useful reorder the total / subtotal sum in the Invoice PDF which is generated by Germanized for WooCommerce, I stumbled upon this .. gem .. o.O | |
* I'd call it one of the most useless incremental counts I've ever seen so far. | |
* @file woocommerce-germanized-pro/templates/invoives/table-gross.php | |
* | |
*/ | |
?> | |
<?php if ( $order_totals = $invoice->get_totals() ) : $i = 0; ?> | |
<?php foreach ( $order_totals as $total ) : $i++; ?> | |
<tr class="footer <?php echo ( isset( $total[ 'classes' ] ) ? implode( ' ', $total[ 'classes' ] ) : "" ); ?>"> | |
<th class="td" scope="row" colspan="3">Label: <?php echo $total['label']; ?></th> | |
<td class="td"><?php echo $total['value']; ?></td> | |
</tr> | |
<?php endforeach; ?> | |
<?php endif; ?> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
post scriptum: Its not being used in the template. At all. Counting for the heck of it? o.O