WC_Meta_Box_Order_Items

WC_Meta_Box_Order_Items Class.

Defined (1)

The class is defined in the following location(s).

/includes/admin/meta-boxes/class-wc-meta-box-order-items.php  
  1. class WC_Meta_Box_Order_Items { 
  2.  
  3. /** 
  4. * Output the metabox. 
  5. * @param WP_Post $post 
  6. */ 
  7. public static function output( $post ) { 
  8. global $post, $thepostid, $theorder; 
  9.  
  10. if ( ! is_int( $thepostid ) ) { 
  11. $thepostid = $post->ID; 
  12.  
  13. if ( ! is_object( $theorder ) ) { 
  14. $theorder = wc_get_order( $thepostid ); 
  15.  
  16. $order = $theorder; 
  17. $data = get_post_meta( $post->ID ); 
  18.  
  19. include( 'views/html-order-items.php' ); 
  20.  
  21. /** 
  22. * Save meta box data. 
  23. * @param int $post_id 
  24. * @param WP_Post $post 
  25. */ 
  26. public static function save( $post_id, $post ) { 
  27. wc_save_order_items( $post_id, $_POST );