@@ 161-169 (lines=9) @@ | ||
158 | ||
159 | $post_data = $this->get_post_data(); |
|
160 | ||
161 | foreach ( $this->get_form_fields() as $key => $field ) { |
|
162 | if ( 'title' !== $this->get_field_type( $field ) ) { |
|
163 | try { |
|
164 | $this->settings[ $key ] = $this->get_field_value( $key, $field, $post_data ); |
|
165 | } catch ( Exception $e ) { |
|
166 | $this->add_error( $e->getMessage() ); |
|
167 | } |
|
168 | } |
|
169 | } |
|
170 | ||
171 | return update_option( $this->get_option_key(), apply_filters( 'woocommerce_settings_api_sanitized_fields_' . $this->id, $this->settings ) ); |
|
172 | } |
@@ 494-502 (lines=9) @@ | ||
491 | ||
492 | $post_data = $this->get_post_data(); |
|
493 | ||
494 | foreach ( $this->get_instance_form_fields() as $key => $field ) { |
|
495 | if ( 'title' !== $this->get_field_type( $field ) ) { |
|
496 | try { |
|
497 | $this->instance_settings[ $key ] = $this->get_field_value( $key, $field, $post_data ); |
|
498 | } catch ( Exception $e ) { |
|
499 | $this->add_error( $e->getMessage() ); |
|
500 | } |
|
501 | } |
|
502 | } |
|
503 | ||
504 | return update_option( $this->get_instance_option_key(), apply_filters( 'woocommerce_shipping_' . $this->id . '_instance_settings_values', $this->instance_settings, $this ) ); |
|
505 | } else { |