Automattic\WooCommerce\Admin\Features\Settings
Transformer::flush_current_group
Flush current group to transformed settings.
Method of the class: Transformer{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->flush_current_group( $transformed_settings ): void;
- $transformed_settings(array) (required)
- Transformed settings array.
Transformer::flush_current_group() Transformer::flush current group code WC 10.8.1
private function flush_current_group( array &$transformed_settings ): void {
if ( is_array( $this->current_group ) && ! empty( $this->current_group ) ) {
$this->current_group[0]['id'] = $this->current_group[0]['id'] ?? wp_unique_prefixed_id( 'setting_title' );
$transformed_settings = array_merge( $transformed_settings, $this->current_group );
}
$this->current_group = null;
}