Code Duplication    Length = 4-5 lines in 2 locations

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

@@ 863-866 (lines=4) @@
860
	 */
861
	public function set_price( $data, $id ) {
862
		//Price
863
		if ( isset( $data['price'] ) && '' !== $data['price'] ) {
864
			$price = preg_replace( '/[^0-9,.]/', '', $data['price'] );
865
			$this->save_custom_field( $price,'price',$id );
866
		}
867
868
		//Price includes
869
		if ( isset( $data['price_includes'] ) && '' !== $data['price_includes'] ) {
@@ 883-887 (lines=5) @@
880
	 * Set the duration
881
	 */
882
	public function set_duration( $data, $id ) {
883
		if ( isset( $data['days'] ) && ! empty( $data['days'] ) ) {
884
			$price = $data['days'];
885
			$price = preg_replace( '/[^0-9,.]/', '', $price );
886
			$this->save_custom_field( $price,'duration',$id );
887
		}
888
	}
889
890
	/**