woocommerce_show_addons_page хук-фильтрWC 8.2.1

Controls whether we add a submenu item for the WooCommerce Addons page. Woo Express uses this filter.

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

add_filter( 'woocommerce_show_addons_page', 'wp_kama_woocommerce_show_addons_page_filter' );

/**
 * Function for `woocommerce_show_addons_page` filter-hook.
 * 
 * @param bool $show_addons_page If the addons page should be included.
 *
 * @return bool
 */
function wp_kama_woocommerce_show_addons_page_filter( $show_addons_page ){

	// filter...
	return $show_addons_page;
}
$show_addons_page(true|false)
If the addons page should be included.

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

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

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

WC_Admin_Menus::__construct()
woocommerce_show_addons_page
woocommerce/includes/admin/class-wc-admin-menus.php 60
if ( apply_filters( 'woocommerce_show_addons_page', true ) ) {

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

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