-
-
Save blogtutor/820cce0cbb24004149fe7dd728866698 to your computer and use it in GitHub Desktop.
Remove WooCommerce 9.3 "Live" badge from Admin Bar. This code goes in theme's functions.php file.
This file contains hidden or 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 // Do not copy opening php tag | |
| /** | |
| * Remove WooCommerce site visibility "Live" badge from the admin bar. | |
| * | |
| * @param WP_Admin_Bar $wp_admin_bar The WP_Admin_Bar instance, passed by reference. | |
| */ | |
| add_action( 'admin_bar_menu', 'khp_remove_woocommerce_site_visibility_badge', 999 ); | |
| function khp_remove_woocommerce_site_visibility_badge( $wp_admin_bar ) { | |
| $wp_admin_bar->remove_node( 'woocommerce-site-visibility-badge' ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment