SHARE
TWEET

Untitled

a guest Oct 31st, 2015 280 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. /* Create array for product list html */
  4. $products_list_html = array();
  5.  
  6. /* Cycle the items inside the order */
  7. foreach($order->get_items('line_item') as $item) {
  8.         $product_id = (true === isset($item['variation_id'])) ? $item['variation_id'] : $item['product_id'];
  9.         $products_list_html[] = '<a href="' . get_permalink($product_id) . '">' . get_the_title($product_id) . '</a>';
  10. }
  11. echo implode('<br />', $products_list_html);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top