Code Duplication    Length = 6-6 lines in 2 locations

classes/class-wetu-importer-accommodation.php 1 location

@@ 772-777 (lines=6) @@
769
				$room_count = count( $data[0]['rooms'] );
770
			}
771
772
			if ( false !== $id && '0' !== $id ) {
773
				$prev_rooms = get_post_meta( $id, 'number_of_rooms', true );
774
				update_post_meta( $id, 'number_of_rooms', $room_count, $prev_rooms );
775
			} else {
776
				add_post_meta( $id, 'number_of_rooms', $room_count, true );
777
			}
778
		}
779
	}
780

classes/class-wetu-importer.php 1 location

@@ 906-911 (lines=6) @@
903
				'elevation'	=> '',
904
			);
905
906
			if ( false !== $id && '0' !== $id ) {
907
				$prev = get_post_meta( $id,'location',true );
908
				update_post_meta( $id,'location',$location_data,$prev );
909
			} else {
910
				add_post_meta( $id,'location',$location_data,true );
911
			}
912
		}
913
	}
914