$user->ID, 'name' => $user->display_name, 'email' => $user->user_email, 'avatar' => get_avatar_url($user->ID), ]; } // Get WooCommerce store settings $store_settings = self::get_store_settings(); // Get asset URLs $plugin_url = plugins_url('', dirname(dirname(__FILE__))); $asset_url = $plugin_url . '/admin-spa/dist'; // Cache busting $version = defined('WP_DEBUG') && WP_DEBUG ? time() : '1.0.0'; $css_url = $asset_url . '/app.css?ver=' . $version; $js_url = $asset_url . '/app.js?ver=' . $version; // Render HTML ?> <?php echo esc_html(get_option('blogname', 'WooNooW')); ?> Admin
$currency, 'currency_symbol' => $currency_sym, 'decimals' => (int) $decimals, 'thousand_sep' => (string) $thousand_sep, 'decimal_sep' => (string) $decimal_sep, 'currency_pos' => (string) $currency_pos, ]; } /** Get the SPA page URL from appearance settings (dynamic slug) */ private static function get_spa_url(): string { $appearance_settings = get_option('woonoow_appearance_settings', []); $spa_page_id = $appearance_settings['general']['spa_page'] ?? 0; if ($spa_page_id) { $spa_url = get_permalink($spa_page_id); if ($spa_url) { return trailingslashit($spa_url); } } // Fallback to /store/ if no SPA page configured return home_url('/store/'); } }