WordPress at Your Fingertips
function is not described

WC_REST_Settings_V2_Controller::filter_group() public WC 3.0.0

Filters out bad values from the groups array/filter so we only return known values via the API.

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

No Hooks.

Return

Array.

Usage

$WC_REST_Settings_V2_Controller = new WC_REST_Settings_V2_Controller();
$WC_REST_Settings_V2_Controller->filter_group( $group );
$group(array) (required)
Group.

Changelog

Since 3.0.0 Introduced.

Code of WC_REST_Settings_V2_Controller::filter_group() WC 5.9.0

public function filter_group( $group ) {
	return array_intersect_key(
		$group,
		array_flip( array_filter( array_keys( $group ), array( $this, 'allowed_group_keys' ) ) )
	);
}