Automattic\WooCommerce\Admin\Features\Settings
Transformer::handle_checkbox_group_item
Handle checkbox within a group.
Method of the class: Transformer{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->handle_checkbox_group_item( $setting, $transformed_settings ): void;
- $setting(array) (required)
- Setting to add.
- $transformed_settings(array) (required)
- Transformed settings array.
Transformer::handle_checkbox_group_item() Transformer::handle checkbox group item code WC 10.5.0
private function handle_checkbox_group_item( array $setting, array &$transformed_settings ): void {
if ( is_array( $this->current_checkbox_group ) ) {
$this->current_checkbox_group[] = $setting;
return;
}
// If we don't have an open checkbox group, add the setting as-is.
$this->add_setting( $setting, $transformed_settings );
}