woocommerce_disable_admin_bar filter-hookWC 3.0.0

Controls whether the WooCommerce admin bar should be disabled.

Usage

add_filter( 'woocommerce_disable_admin_bar', 'wp_kama_woocommerce_disable_admin_bar_filter' );

/**
 * Function for `woocommerce_disable_admin_bar` filter-hook.
 * 
 * @param bool $enabled 
 *
 * @return bool
 */
function wp_kama_woocommerce_disable_admin_bar_filter( $enabled ){

	// filter...
	return $enabled;
}
$enabled(true|false)
-

Changelog

Since 3.0.0 Introduced.

Where the hook is called

wc_disable_admin_bar()
woocommerce_disable_admin_bar
WC_Admin::prevent_admin_access()
woocommerce_disable_admin_bar
woocommerce/includes/wc-user-functions.php 32
if ( apply_filters( 'woocommerce_disable_admin_bar', true ) && ! ( current_user_can( 'edit_posts' ) || current_user_can( 'manage_woocommerce' ) ) ) {
woocommerce/includes/admin/class-wc-admin.php 162
apply_filters( 'woocommerce_disable_admin_bar', true )

Where the hook is used in WooCommerce

Usage not found.