__( 'Coming soon', 'woocommerce' ), 'store-coming-soon' => __( 'Store coming soon', 'woocommerce' ), 'live' => __( 'Live', 'woocommerce' ), ); if ( get_option( 'woocommerce_coming_soon' ) === 'yes' ) { if ( get_option( 'woocommerce_store_pages_only' ) === 'yes' ) { $key = 'store-coming-soon'; } else { $key = 'coming-soon'; } } else { $key = 'live'; } $args = array( 'id' => 'woocommerce-site-visibility-badge', 'title' => $labels[ $key ], 'href' => admin_url( 'admin.php?page=wc-settings&tab=site-visibility' ), 'meta' => array( 'class' => 'woocommerce-site-status-badge-' . $key, ), ); $wp_admin_bar->add_node( $args ); } /** * Output CSS for site visibility badge. * * @internal */ public function output_css() { // Early exit if LYS feature is disabled. if ( ! FeaturesUtil::feature_is_enabled( 'site_visibility_badge' ) ) { return; } if ( is_admin_bar_showing() ) { echo ''; } } }