@@ 116-124 (lines=9) @@ | ||
113 | public function process_admin_options() { |
|
114 | $this->init_settings(); |
|
115 | ||
116 | foreach ( $this->get_form_fields() as $key => $field ) { |
|
117 | if ( ! in_array( $this->get_field_type( $field ), array( 'title' ) ) ) { |
|
118 | try { |
|
119 | $this->settings[ $key ] = $this->get_field_value( $key, $field ); |
|
120 | } catch ( Exception $e ) { |
|
121 | $this->add_error( $e->getMessage() ); |
|
122 | } |
|
123 | } |
|
124 | } |
|
125 | ||
126 | return update_option( $this->get_option_key(), apply_filters( 'woocommerce_settings_api_sanitized_fields_' . $this->id, $this->settings ) ); |
|
127 | } |
@@ 436-444 (lines=9) @@ | ||
433 | if ( $this->instance_id ) { |
|
434 | $this->init_instance_settings(); |
|
435 | ||
436 | foreach ( $this->get_instance_form_fields() as $key => $field ) { |
|
437 | if ( ! in_array( $this->get_field_type( $field ), array( 'title' ) ) ) { |
|
438 | try { |
|
439 | $this->instance_settings[ $key ] = $this->get_field_value( $key, $field ); |
|
440 | } catch ( Exception $e ) { |
|
441 | $this->add_error( $e->getMessage() ); |
|
442 | } |
|
443 | } |
|
444 | } |
|
445 | ||
446 | return update_option( $this->get_instance_option_key(), apply_filters( 'woocommerce_shipping_' . $this->id . '_instance_settings_values', $this->instance_settings, $this ) ); |
|
447 | } else { |