woocommerce_settings_groups хук-фильтрWC 3.0.0

Get all settings groups items.

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

add_filter( 'woocommerce_settings_groups', 'wp_kama_woocommerce_settings_groups_filter' );

/**
 * Function for `woocommerce_settings_groups` filter-hook.
 * 
 * @param WP_REST_Request $request Request data.
 *
 * @return WP_REST_Request
 */
function wp_kama_woocommerce_settings_groups_filter( $request ){

	// filter...
	return $request;
}
$request(WP_REST_Request)
Request data.

Список изменений

С версии 3.0.0 Введена.

Где вызывается хук

WC_REST_Settings_V2_Controller::get_items()
woocommerce_settings_groups
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-settings-v2-controller.php 61
$groups = apply_filters( 'woocommerce_settings_groups', array() );

Где используется хук в WooCommerce

woocommerce/includes/class-wc-register-wp-admin-settings.php 40
add_filter( 'woocommerce_settings_groups', array( $this, 'register_page_group' ) );
woocommerce/includes/class-wc-register-wp-admin-settings.php 43
add_filter( 'woocommerce_settings_groups', array( $this, 'register_email_group' ) );
woocommerce/src/Internal/Admin/Settings.php 44
add_filter( 'woocommerce_settings_groups', array( $this, 'add_settings_group' ) );