WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Получай пассивный доход от сайта с помощью браузерных PUSH уведомлений
функция не описана

WC_REST_Setting_Options_Controller::get_group_settings() public WC 1.0

Get all settings in a group.

{} Это метод класса: WC_REST_Setting_Options_Controller{}

Хуки из метода
Возвращает

Массив/WP_Error. Ничего.

Использование

$WC_REST_Setting_Options_Controller = new WC_REST_Setting_Options_Controller();
$WC_REST_Setting_Options_Controller->get_group_settings( $group_id );
$group_id(строка) (обязательный)
Group ID.

Код WC_REST_Setting_Options_Controller::get_group_settings() WC 5.2.2

<?php
public function get_group_settings( $group_id ) {
	if ( empty( $group_id ) ) {
		return new WP_Error( 'rest_setting_setting_group_invalid', __( 'Invalid setting group.', 'woocommerce' ), array( 'status' => 404 ) );
	}

	$settings = apply_filters( 'woocommerce_settings-' . $group_id, array() ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores

	if ( empty( $settings ) ) {
		return new WP_Error( 'rest_setting_setting_group_invalid', __( 'Invalid setting group.', 'woocommerce' ), array( 'status' => 404 ) );
	}

	$filtered_settings = array();
	foreach ( $settings as $setting ) {
		$option_key = $setting['option_key'];
		$setting    = $this->filter_setting( $setting );
		$default    = isset( $setting['default'] ) ? $setting['default'] : '';
		// Get the option value.
		if ( is_array( $option_key ) ) {
			$option           = get_option( $option_key[0] );
			$setting['value'] = isset( $option[ $option_key[1] ] ) ? $option[ $option_key[1] ] : $default;
		} else {
			$admin_setting_value = WC_Admin_Settings::get_option( $option_key, $default );
			$setting['value']    = $admin_setting_value;
		}

		if ( 'multi_select_countries' === $setting['type'] ) {
			$setting['options'] = WC()->countries->get_countries();
			$setting['type']    = 'multiselect';
		} elseif ( 'single_select_country' === $setting['type'] ) {
			$setting['type']    = 'select';
			$setting['options'] = $this->get_countries_and_states();
		} elseif ( 'single_select_page' === $setting['type'] ) {
			$pages   = get_pages(
				array(
					'sort_column'  => 'menu_order',
					'sort_order'   => 'ASC',
					'hierarchical' => 0,
				)
			);
			$options = array();
			foreach ( $pages as $page ) {
				$options[ $page->ID ] = ! empty( $page->post_title ) ? $page->post_title : '#' . $page->ID;
			}
			$setting['type']    = 'select';
			$setting['options'] = $options;
		}

		$filtered_settings[] = $setting;
	}

	return $filtered_settings;
}