Skip to content

Instantly share code, notes, and snippets.

@stuartduff
Created August 30, 2012 15:33
Show Gist options
  • Save stuartduff/3531043 to your computer and use it in GitHub Desktop.
Save stuartduff/3531043 to your computer and use it in GitHub Desktop.
Add WooCommerce Product ID To Checkout
<tr class="cart-subtotal">
<th colspan="2"><strong><?php _e('WordPress Theme Product ID', 'woocommerce'); ?></strong></th>
<?php
foreach ($woocommerce->cart->get_cart() as $item_id => $values) :
$_product = $values['data'];
?>
<td><?php echo $_product->id; ?></td>
<?php endforeach; ?>
</tr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment