Code Duplication    Length = 8-9 lines in 2 locations

includes/shipping/free-shipping/class-wc-shipping-free-shipping.php 1 location

@@ 145-152 (lines=8) @@
142
	 * Called to calculate shipping rates for this method. Rates can be added using the add_rate() method.
143
	 * @uses WC_Shipping_Method::add_rate()
144
	 */
145
	public function calculate_shipping() {
146
		$this->add_rate( array(
147
			'id' 	 => $this->id . $this->instance_id,
148
			'label'  => $this->title,
149
			'cost' 	 => 0,
150
			'taxes'  => false
151
		) );
152
	}
153
}
154

includes/shipping/legacy-free-shipping/class-wc-shipping-legacy-free-shipping.php 1 location

@@ 209-217 (lines=9) @@
206
	 * calculate_shipping function.
207
	 * @return array
208
	 */
209
	public function calculate_shipping() {
210
		$args = array(
211
			'id' 	=> $this->id,
212
			'label' => $this->title,
213
			'cost' 	=> 0,
214
			'taxes' => false
215
		);
216
		$this->add_rate( $args );
217
	}
218
}
219