'fontWeight' => '400', 'src' => array( WC()->plugin_url() . '/assets/fonts/cardo_normal_400.woff2' ), ), ), ), ); // Add WooCommerce fonts if they don't already exist. foreach ( $fonts_to_add as $font_to_add ) { $found = false; foreach ( $font_data as $font ) { if ( isset( $font['name'] ) && $font['name'] === $font_to_add['name'] ) { $found = true; break; } } if ( ! $found ) { $font_data[] = $font_to_add; } } $new_data = array( 'version' => 1, 'settings' => array( 'typography' => array( 'fontFamilies' => array( 'theme' => $font_data, ), ), ), ); $theme_json->update_with( $new_data ); return $theme_json; } /** * Enqueues the coming soon banner styles. */ public function enqueue_styles() { // Early exit if the user is not logged in as administrator / shop manager. if ( ! current_user_can( 'manage_woocommerce' ) ) { return; } // Early exit if LYS feature is disabled. if ( ! Features::is_enabled( 'launch-your-store' ) ) { return; } if ( $this->coming_soon_helper->is_site_live() ) { return; } wp_enqueue_style( 'woocommerce-coming-soon', WC()->plugin_url() . '/assets/css/coming-soon' . ( is_rtl() ? '-rtl' : '' ) . '.css', array(), Constants::get_constant( 'WC_VERSION' ) ); } }