Automattic\WooCommerce\Internal\Admin

Settings::get_custom_settings()privateWC 1.0

Gets custom settings used for WC Admin.

{} It's a method of the class: Settings{}

No Hooks.

Return

Array.

Usage

// private - for code of main (parent) class only
$result = $this->get_custom_settings( $settings );
$settings(array) (required)
Array of settings to merge into.

Code of Settings::get_custom_settings() WC 6.6.1

private function get_custom_settings( $settings ) {
	$wc_rest_settings_options_controller = new \WC_REST_Setting_Options_Controller();
	$wc_admin_group_settings             = $wc_rest_settings_options_controller->get_group_settings( 'wc_admin' );
	$settings['wcAdminSettings']         = array();

	foreach ( $wc_admin_group_settings as $setting ) {
		if ( ! empty( $setting['id'] ) ) {
			$settings['wcAdminSettings'][ $setting['id'] ] = $setting['value'];
		}
	}
	return $settings;
}