Advertisement
tribulant

Untitled

Mar 26th, 2014
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.47 KB | None | 0 0
  1. function order_finished($order_id = null, $pmethod = null, $paid = null) {
  2.  //an order was finished, now we can do something with it
  3.  if ($order = wpco_get_order($order_id)) {
  4.  //we now have all the data of the order to work with
  5.  //print_r($order);
  6.     global $wpcoDb, $Item, $Order;
  7.     $wpcoDb -> model = $Item -> model;
  8.     $items = $wpcoDb -> find_all(array('order_id' => $order -> id));
  9.     //print_r($items);
  10.  }
  11. }
  12.  
  13. add_action('wpco_order_finished', 'order_finished', 10, 3);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement