Code Duplication    Length = 4-4 lines in 3 locations

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

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