Automattic\WooCommerce\Admin\Features\Settings
Transformer::process_setting()
Process individual setting.
Метод класса: Transformer{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->process_setting( $setting, $transformed_settings ): void;
- $setting(массив) (обязательный)
- Setting to process.
- $transformed_settings(массив) (обязательный)
- Transformed settings array.
Код Transformer::process_setting() Transformer::process setting WC 9.7.1
private function process_setting( array $setting, array &$transformed_settings ): void { $type = $setting['type'] ?? ''; if ( $this->current_checkbox_group && 'checkbox' !== $type ) { // It's expected that a checkbox group will always be closed before a non-checkbox setting. // If not, it's likely a checkbox group was not closed properly so we flush the current checkbox group and add the setting as-is. $this->flush_current_checkbox_group(); } switch ( $type ) { case 'title': $this->handle_group_start( $setting, $transformed_settings ); break; case 'sectionend': $this->handle_group_end( $setting, $transformed_settings ); break; case 'checkbox': $this->handle_checkbox_setting( $setting, $transformed_settings ); break; default: $this->add_setting( $setting, $transformed_settings ); break; } }