Code Duplication    Length = 4-4 lines in 3 locations

includes/abstracts/abstract-wc-order.php 3 locations

@@ 910-913 (lines=4) @@
907
		$item->set_order_id( $this->get_id() ? $this->get_id() : $this->save() );
908
		$item->save();
909
910
		if ( has_action( 'woocommerce_order_add_product' ) ) {
911
			_deprecated_function( 'Action: woocommerce_order_add_product', '2.7', 'Use woocommerce_new_order_item action instead.' );
912
			do_action( 'woocommerce_order_add_product', $this->get_id(), $item->get_id(), $product, $qty, $args );
913
		}
914
915
		return $item->get_id();
916
	}
@@ 1011-1014 (lines=4) @@
1008
		$item->set_order_id( $this->get_id() ? $this->get_id() : $this->save() );
1009
		$item->save();
1010
1011
		if ( has_action( 'woocommerce_order_add_shipping' ) ) {
1012
			_deprecated_function( 'Action: woocommerce_order_add_shipping', '2.7', 'Use woocommerce_new_order_item action instead.' );
1013
			do_action( 'woocommerce_order_add_shipping', $this->get_id(), $item->get_id(), $shipping_rate );
1014
		}
1015
1016
		return $item->get_id();
1017
	}
@@ 1039-1042 (lines=4) @@
1036
		$item->set_order_id( $this->get_id() ? $this->get_id() : $this->save() );
1037
		$item->save();
1038
1039
		if ( has_action( 'woocommerce_order_add_fee' ) ) {
1040
			_deprecated_function( 'Action: woocommerce_order_add_fee', '2.7', 'Use woocommerce_new_order_item action instead.' );
1041
			do_action( 'woocommerce_order_add_fee', $this->get_id(), $item->get_id(), $fee );
1042
		}
1043
1044
		return $item->get_id();
1045
	}