Advertisement
tribulant

Untitled

Aug 22nd, 2013
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.97 KB | None | 0 0
  1. case 'Order'                :                  
  2.                         global $wpcoDb, $Order, $Item;
  3.                         $order_data = $Order -> data;
  4.                    
  5.                         if (!empty($order_data -> shipped)) {
  6.                             $wpcoDb -> model = $Item -> model;
  7.                             $wpcoDb -> save_field('shipped', $order_data -> shipped, array('order_id' => $insertid));
  8.                         }
  9.                        
  10.                         if (!empty($order_data -> paid)) {                     
  11.                             $wpcoDb -> model = $Item -> model;
  12.                             $wpcoDb -> save_field('paid', $order_data -> paid, array('order_id' => $insertid));
  13.                         }
  14.                        
  15.                         $this -> model = 'Order';
  16.                         ${$this -> model} -> data = $order_data;
  17.                        
  18.                         if (!empty(${$this -> model} -> data -> notifycustomer)) {
  19.                             $to = ${$this -> model} -> data -> bill_email;
  20.                             $subject = stripslashes(${$this -> model} -> data -> notifysubject);
  21.                             $message = $this -> render('orders' . DS . 'comments', array('order' => ${$this -> model} -> data), false, 'email');
  22.                             $this -> send_mail($to, $subject, $message);
  23.                         }
  24.                         break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement