Code Duplication    Length = 6-6 lines in 2 locations

classes/class-wetu-importer.php 1 location

@@ 891-896 (lines=6) @@
888
				'elevation'	=> '',
889
			);
890
891
			if ( false !== $id && '0' !== $id ) {
892
				$prev = get_post_meta( $id,'location',true );
893
				update_post_meta( $id,'location',$location_data,$prev );
894
			} else {
895
				add_post_meta( $id,'location',$location_data,true );
896
			}
897
		}
898
	}
899

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

@@ 795-800 (lines=6) @@
792
				$room_count = count( $data[0]['rooms'] );
793
			}
794
795
			if ( false !== $id && '0' !== $id ) {
796
				$prev_rooms = get_post_meta( $id,'number_of_rooms',true );
797
				update_post_meta( $id,'number_of_rooms',$room_count,$prev_rooms );
798
			} else {
799
				add_post_meta( $id,'number_of_rooms',$room_count,true );
800
			}
801
		}
802
	}
803