Code Duplication    Length = 4-5 lines in 2 locations

classes/class-wetu-importer-tours.php 2 locations

@@ 886-889 (lines=4) @@
883
	 */
884
	public function set_price( $data, $id ) {
885
		//Price
886
		if ( isset( $data['price'] ) && '' !== $data['price'] ) {
887
			$price = preg_replace( '/[^0-9,.]/', '', $data['price'] );
888
			$this->save_custom_field( $price,'price',$id );
889
		}
890
891
		//Price includes
892
		if ( isset( $data['price_includes'] ) && '' !== $data['price_includes'] ) {
@@ 906-910 (lines=5) @@
903
	 * Set the duration
904
	 */
905
	public function set_duration( $data, $id ) {
906
		if ( isset( $data['days'] ) && ! empty( $data['days'] ) ) {
907
			$price = $data['days'];
908
			$price = preg_replace( '/[^0-9,.]/', '', $price );
909
			$this->save_custom_field( $price,'duration',$id );
910
		}
911
	}
912
913
	/**