Code Duplication    Length = 16-16 lines in 2 locations

includes/abstracts/abstract-wc-settings-api.php 2 locations

@@ 750-765 (lines=16) @@
747
	 * @param  string $key
748
	 * @return string
749
	 */
750
	public function validate_price_field( $key ) {
751
		$text      = $this->get_option( $key );
752
		$field_key = $this->get_field_key( $key );
753
754
		if ( isset( $_POST[ $field_key ] ) ) {
755
756
			if ( $_POST[ $field_key ] !== '' ) {
757
				$text = wc_format_decimal( trim( stripslashes( $_POST[ $field_key ] ) ) );
758
			} else {
759
				$text = '';
760
			}
761
		}
762
763
		return $text;
764
	}
765
766
	/**
767
	 * Validate Decimal Field.
768
	 *
@@ 774-789 (lines=16) @@
771
	 * @param  string $key
772
	 * @return string
773
	 */
774
	public function validate_decimal_field( $key ) {
775
		$text      = $this->get_option( $key );
776
		$field_key = $this->get_field_key( $key );
777
778
		if ( isset( $_POST[ $field_key ] ) ) {
779
780
			if ( $_POST[ $field_key ] !== '' ) {
781
				$text = wc_format_decimal( trim( stripslashes( $_POST[ $field_key ] ) ) );
782
			} else {
783
				$text = '';
784
			}
785
		}
786
787
		return $text;
788
	}
789
790
	/**
791
	 * Validate Password Field.
792
	 *