Created
September 13, 2024 15:59
-
-
Save barryhughes/f1365b0ffcb131eaa731a6850fca5171 to your computer and use it in GitHub Desktop.
WooCommerce > 9.3.1 > Remove "live" (site visiblity) from admin bar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Removes the 'site visibility badge' from the WordPress admin bar. | |
* | |
* Intended for use with WooCommerce 9.3.1, can be used via a code | |
* snippet manager or else you may wish to add as a mu-plugin, ie: | |
* | |
* wp-content/mu-plugin/disable-site-visibility-badge.php | |
*/ | |
add_action( | |
'admin_bar_menu', | |
function ( $wp_admin_bar ) { | |
$wp_admin_bar->remove_menu( 'woocommerce-site-visibility-badge' ); | |
}, | |
1000 | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment