Code Duplication    Length = 7-7 lines in 3 locations

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

@@ 482-488 (lines=7) @@
479
			delete_option( 'wetu_importer_accommodation_settings' );
480
481
			// @codingStandardsIgnoreLine
482
			if ( isset( $_POST['content'] ) && is_array( $_POST['content'] ) && ! empty( $_POST['content'] ) ) {
483
				// @codingStandardsIgnoreLine
484
				$content = $_POST['content'];
485
				add_option( 'wetu_importer_accommodation_settings',$content );
486
			} else {
487
				$content = false;
488
			}
489
490
			$jdata = file_get_contents( $this->url . '/Get?' . $this->url_qs . '&ids=' . $wetu_id );
491

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

@@ 518-524 (lines=7) @@
515
			delete_option( 'wetu_importer_destination_settings' );
516
517
			// @codingStandardsIgnoreLine
518
			if ( isset( $_POST['content'] ) && is_array( $_POST['content'] ) && ! empty( $_POST['content'] ) ) {
519
				// @codingStandardsIgnoreLine
520
				$content = $_POST['content'];
521
				add_option( 'wetu_importer_destination_settings', $content );
522
			} else {
523
				$content = false;
524
			}
525
526
			$jdata = file_get_contents( $this->url . '/Get?' . $this->url_qs . '&ids=' . $wetu_id );
527

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

@@ 531-537 (lines=7) @@
528
			delete_option( 'wetu_importer_tour_settings' );
529
530
			// @codingStandardsIgnoreLine
531
			if ( isset( $_POST['content'] ) && is_array( $_POST['content'] ) && ! empty( $_POST['content'] ) ) {
532
				// @codingStandardsIgnoreLine
533
				$content = $_POST['content'];
534
				add_option( 'wetu_importer_tour_settings',$content );
535
			} else {
536
				$content = false;
537
			}
538
539
			$jdata = file_get_contents( 'http://wetu.com/API/Itinerary/V7/Get?id=' . $wetu_id );
540