/**
  * Save properties specific to this order item.
  * @return int Item ID
  */
 public function save()
 {
     parent::save();
     if ($this->get_id()) {
         wc_update_order_item_meta($this->get_id(), 'discount_amount', $this->get_discount());
         wc_update_order_item_meta($this->get_id(), 'discount_amount_tax', $this->get_discount_tax());
     }
     return $this->get_id();
 }
 /**
  * Save properties specific to this order item.
  * @return int Item ID
  */
 public function save()
 {
     parent::save();
     if ($this->get_id()) {
         wc_update_order_item_meta($this->get_id(), 'method_id', $this->get_method_id());
         wc_update_order_item_meta($this->get_id(), 'cost', $this->get_total());
         wc_update_order_item_meta($this->get_id(), 'total_tax', $this->get_total_tax());
         wc_update_order_item_meta($this->get_id(), 'taxes', $this->get_taxes());
     }
     return $this->get_id();
 }
 /**
  * Save properties specific to this order item.
  * @return int Item ID
  */
 public function save()
 {
     parent::save();
     if ($this->get_id()) {
         wc_update_order_item_meta($this->get_id(), 'rate_id', $this->get_rate_id());
         wc_update_order_item_meta($this->get_id(), 'label', $this->get_label());
         wc_update_order_item_meta($this->get_id(), 'compound', $this->get_compound());
         wc_update_order_item_meta($this->get_id(), 'tax_amount', $this->get_tax_total());
         wc_update_order_item_meta($this->get_id(), 'shipping_tax_amount', $this->get_shipping_tax_total());
     }
     return $this->get_id();
 }
 /**
  * Save properties specific to this order item.
  * @return int Item ID
  */
 public function save()
 {
     parent::save();
     if ($this->get_id()) {
         wc_update_order_item_meta($this->get_id(), '_tax_class', $this->get_tax_class());
         wc_update_order_item_meta($this->get_id(), '_tax_status', $this->get_tax_status());
         wc_update_order_item_meta($this->get_id(), '_line_total', $this->get_total());
         wc_update_order_item_meta($this->get_id(), '_line_tax', $this->get_total_tax());
         wc_update_order_item_meta($this->get_id(), '_line_tax_data', $this->get_taxes());
     }
     return $this->get_id();
 }
 /**
  * Save properties specific to this order item.
  * @return int Item ID
  */
 public function save()
 {
     parent::save();
     if ($this->get_id()) {
         wc_update_order_item_meta($this->get_id(), '_product_id', $this->get_product_id());
         wc_update_order_item_meta($this->get_id(), '_variation_id', $this->get_variation_id());
         wc_update_order_item_meta($this->get_id(), '_qty', $this->get_quantity());
         wc_update_order_item_meta($this->get_id(), '_tax_class', $this->get_tax_class());
         wc_update_order_item_meta($this->get_id(), '_line_subtotal', $this->get_subtotal());
         wc_update_order_item_meta($this->get_id(), '_line_subtotal_tax', $this->get_subtotal_tax());
         wc_update_order_item_meta($this->get_id(), '_line_total', $this->get_total());
         wc_update_order_item_meta($this->get_id(), '_line_tax', $this->get_total_tax());
         wc_update_order_item_meta($this->get_id(), '_line_tax_data', $this->get_taxes());
     }
     return $this->get_id();
 }