Code Duplication    Length = 7-7 lines in 3 locations

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

@@ 469-475 (lines=7) @@
466
			delete_option( 'lsx_wetu_importer_accommodation_settings' );
467
468
			// @codingStandardsIgnoreLine
469
			if ( isset( $_POST['content'] ) && is_array( $_POST['content'] ) && ! empty( $_POST['content'] ) ) {
470
				// @codingStandardsIgnoreLine
471
				$content = $_POST['content'];
472
				add_option( 'lsx_wetu_importer_accommodation_settings',$content );
473
			} else {
474
				$content = false;
475
			}
476
477
			$jdata = wp_remote_get( $this->url . '/Get?' . $this->url_qs . '&ids=' . $wetu_id );
478

classes/class-lsx-wetu-importer-destination.php 1 location

@@ 506-512 (lines=7) @@
503
			delete_option( 'lsx_wetu_importer_destination_settings' );
504
505
			// @codingStandardsIgnoreLine
506
			if ( isset( $_POST['content'] ) && is_array( $_POST['content'] ) && ! empty( $_POST['content'] ) ) {
507
				// @codingStandardsIgnoreLine
508
				$content = $_POST['content'];
509
				add_option( 'lsx_wetu_importer_destination_settings', $content );
510
			} else {
511
				$content = false;
512
			}
513
514
			$jdata = wp_remote_get( $this->url . '/Get?' . $this->url_qs . '&ids=' . $wetu_id );
515

classes/class-lsx-wetu-importer-tours.php 1 location

@@ 460-466 (lines=7) @@
457
			delete_option( 'lsx_wetu_importer_tour_settings' );
458
459
			// @codingStandardsIgnoreLine
460
			if ( isset( $_POST['content'] ) && is_array( $_POST['content'] ) && ! empty( $_POST['content'] ) ) {
461
				// @codingStandardsIgnoreLine
462
				$content = $_POST['content'];
463
				add_option( 'lsx_wetu_importer_tour_settings',$content );
464
			} else {
465
				$content = false;
466
			}
467
			$jdata = wp_remote_get( 'https://wetu.com/API/Itinerary/V8/Get?id=' . $wetu_id );
468
469
			if ( ! empty( $jdata ) && isset( $jdata['response'] ) && isset( $jdata['response']['code'] ) && 200 === $jdata['response']['code'] ) {