Code Duplication    Length = 9-9 lines in 2 locations

includes/abstracts/abstract-wc-settings-api.php 1 location

@@ 129-137 (lines=9) @@
126
	public function process_admin_options() {
127
		$this->init_settings();
128
129
		foreach ( $this->get_form_fields() as $key => $field ) {
130
			if ( 'title' !== $this->get_field_type( $field ) ) {
131
				try {
132
					$this->settings[ $key ] = $this->get_field_value( $key, $field );
133
				} catch ( Exception $e ) {
134
					$this->add_error( $e->getMessage() );
135
				}
136
			}
137
		}
138
139
		return update_option( $this->get_option_key(), apply_filters( 'woocommerce_settings_api_sanitized_fields_' . $this->id, $this->settings ) );
140
	}

includes/abstracts/abstract-wc-shipping-method.php 1 location

@@ 449-457 (lines=9) @@
446
		if ( $this->instance_id ) {
447
			$this->init_instance_settings();
448
449
			foreach ( $this->get_instance_form_fields() as $key => $field ) {
450
				if ( 'title' !== $this->get_field_type( $field ) ) {
451
					try {
452
						$this->instance_settings[ $key ] = $this->get_field_value( $key, $field );
453
					} catch ( Exception $e ) {
454
						$this->add_error( $e->getMessage() );
455
					}
456
				}
457
			}
458
459
			return update_option( $this->get_instance_option_key(), apply_filters( 'woocommerce_shipping_' . $this->id . '_instance_settings_values', $this->instance_settings, $this ) );
460
		} else {