Conditionally Enable/Disable The “Topbar” WordPress

add_action( 'wpex_is_top_bar_enabled', function( $bool ) {

	// Disable on checkout
	if ( function_exists( 'is_checkout' ) && is_checkout() ) {
		$bool = false;
	}

	// Return display
	return $bool;

} );
See also  Remove Recommended Plugins Notice WordPress

Leave a Reply

Your email address will not be published. Required fields are marked *