woocommerce_get_sections_(id) хук-фильтрWC 1.0

Get all sections for this page, both the own ones and the ones defined via filters.

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

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

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

	// filter...
	return $sections;
}
$sections
-

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

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

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

woocommerce/src/Admin/Features/Features.php 62
add_filter( 'woocommerce_get_sections_advanced', array( __CLASS__, 'add_features_section' ) );
woocommerce/src/Internal/ProductDownloads/ApprovedDirectories/Admin/UI.php 49
add_filter( 'woocommerce_get_sections_products', array( $this, 'add_section' ) );