fix(vip): Batch 0 wiring for VIP settings, URLs, and order meta
Wire get_vip_settings alias, tab aliases for vip/assets, expired-level meta, VIP2 order-level fallback, JSON-safe order notes, and header/float pay-vip CTAs.
This commit is contained in:
1 parent
01719b7fa1
commit
69836154fd
9 files changed
+122
-71
No files matched your search
@@ -296,10 +296,13 @@ if (!function_exists('aksrt_user_center_resolve_tabs')) {
|
||||
$keys = array_keys($tabs);
|
||||
$default = in_array('profile', $keys, true) ? 'profile' : ($keys[0] ?? 'profile');
|
||||
$active = isset($_GET['tab']) ? sanitize_key(wp_unslash($_GET['tab'])) : $default;
|
||||
if ('signin' === $active) {
|
||||
if ('signin' === $active || 'assets' === $active) {
|
||||
$active = 'credits';
|
||||
} elseif ('invite' === $active) {
|
||||
$active = 'settings';
|
||||
} elseif ('vip' === $active) {
|
||||
// Prefer dedicated vip tab when registered; else credits (VIP shop).
|
||||
$active = in_array('vip', $keys, true) ? 'vip' : 'credits';
|
||||
}
|
||||
if (!in_array($active, $keys, true)) {
|
||||
$active = $default;
|
||||
@@ -353,7 +356,13 @@ if (!function_exists('aksrt_user_center_runtime_config')) {
|
||||
'userId' => $user_id,
|
||||
'defaultTab' => $default_tab,
|
||||
'activeTab' => $active_tab,
|
||||
'tabAliases' => ['signin' => 'credits', 'invite' => 'settings'],
|
||||
'tabAliases' => [
|
||||
'signin' => 'credits',
|
||||
'invite' => 'settings',
|
||||
'assets' => 'credits',
|
||||
// vip → vip when panel exists; SPA may still map missing keys via server resolve.
|
||||
'vip' => 'vip',
|
||||
],
|
||||
'tabUrls' => $tab_urls,
|
||||
'i18n' => [
|
||||
'contactUrlPlaceholder' => __('链接 URL', 'aksrt'),
|
||||
|
||||
Reference in new issue
Block a user