Code Duplication    Length = 6-7 lines in 3 locations

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

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

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

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

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

@@ 500-505 (lines=6) @@
497
			delete_option( 'wetu_importer_destination_settings' );
498
499
			// @codingStandardsIgnoreLine
500
			if ( isset( $_POST['content'] ) && is_array( $_POST['content'] ) && ! empty( $_POST['content'] ) ) {
501
				// @codingStandardsIgnoreLine
502
				$content = $_POST['content'];
503
				add_option( 'wetu_importer_destination_settings', $content );
504
			} else {
505
				$content = false;
506
			}
507
508
			$jdata = file_get_contents( $this->url . '/Get?' . $this->url_qs . '&ids=' . $wetu_id );