tribulant

Save a product manually

Sep 22nd, 2011
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.38 KB | None | 0 0
  1. <?php
  2.  
  3. /* You'll have data from your custom form POST to this code */
  4.  
  5. if (class_exists('wpCheckout')) {
  6.     if ($wpCheckout = new wpCheckout()) {
  7.         global $Product;
  8.         $Product -> save($_POST);   //posted data will go into the save() method
  9.  
  10.         /* You can print_r the errors variable to see what is missing */
  11.         echo '<pre>' . print_r($Product -> errors, true) . '</pre>';
  12.     }
  13. }
  14.  
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment