Code Duplication    Length = 4-5 lines in 2 locations

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

@@ 798-801 (lines=4) @@
795
	 */
796
	public function set_price( $data, $id ) {
797
		//Price
798
		if ( isset( $data['price'] ) && '' !== $data['price'] ) {
799
			$price = preg_replace( '/[^0-9,.]/', '', $data['price'] );
800
			$this->save_custom_field( $price,'price',$id );
801
		}
802
803
		//Price includes
804
		if ( isset( $data['price_includes'] ) && '' !== $data['price_includes'] ) {
@@ 818-822 (lines=5) @@
815
	 * Set the duration
816
	 */
817
	public function set_duration( $data, $id ) {
818
		if ( isset( $data['days'] ) && ! empty( $data['days'] ) ) {
819
			$price = $data['days'];
820
			$price = preg_replace( '/[^0-9,.]/', '', $price );
821
			$this->save_custom_field( $price,'duration',$id );
822
		}
823
	}
824
825
	/**