woocommerce_get_sections_(id) filter-hookWC 2.2.0

Filters the sections for this settings page.

Usage

add_filter( 'woocommerce_get_sections_(id)', 'wp_kama_woocommerce_get_sections_id_filter' );

/**
 * Function for `woocommerce_get_sections_(id)` filter-hook.
 * 
 * @param array $sections The sections for this settings page.
 *
 * @return array
 */
function wp_kama_woocommerce_get_sections_id_filter( $sections ){

	// filter...
	return $sections;
}
$sections(array)
The sections for this settings page.

Changelog

Since 2.2.0 Introduced.

Where the hook is called

WC_Settings_Page::get_sections()
woocommerce_get_sections_(id)
woocommerce/includes/admin/settings/class-wc-settings-page.php 172
return (array) apply_filters( 'woocommerce_get_sections_' . $this->id, $sections );

Where the hook is used in WooCommerce

woocommerce/src/Internal/Features/FeaturesController.php 92
self::add_filter( 'woocommerce_get_sections_advanced', array( $this, 'add_features_section' ), 10, 1 );
woocommerce/src/Internal/ProductAttributesLookup/LookupDataStore.php 53
self::add_filter( 'woocommerce_get_sections_products', array( $this, 'add_advanced_section_to_product_settings' ), 100, 1 );
woocommerce/src/Internal/ProductDownloads/ApprovedDirectories/Admin/UI.php 49
add_filter( 'woocommerce_get_sections_products', array( $this, 'add_section' ) );