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
@@ -161,13 +161,12 @@ if (!function_exists('aksrt_render_header_menu_buttons')) :
|
||||
}
|
||||
}
|
||||
|
||||
// VIP open CTA for guests / non-VIP.
|
||||
$user_id = get_current_user_id();
|
||||
$vip_url = function_exists('aksrt_get_vip_purchase_url') ? aksrt_get_vip_purchase_url() : (function_exists('aksrt_get_user_center_url') ? aksrt_get_user_center_url('vip') : '#');
|
||||
$show_vip = true;
|
||||
if (class_exists('\AKSRT\Settings\Settings') && method_exists('\AKSRT\Settings\Settings', 'get_vip_settings')) {
|
||||
$vs = \AKSRT\Settings\Settings::get_vip_settings();
|
||||
$show_vip = !empty($vs['enabled']) || !empty($vs['vip1_enabled']) || !empty($vs['vip2_enabled']);
|
||||
// VIP open CTA for guests / non-VIP (zibll: .pay-vip modal).
|
||||
$user_id = get_current_user_id();
|
||||
$show_vip = false;
|
||||
if (class_exists('\AKSRT\Settings\Settings')) {
|
||||
$vs = \AKSRT\Settings\Settings::get_payment_vip_settings();
|
||||
$show_vip = !empty($vs['enabled']);
|
||||
}
|
||||
if ($show_vip) {
|
||||
$is_vip = false;
|
||||
@@ -175,9 +174,9 @@ if (!function_exists('aksrt_render_header_menu_buttons')) :
|
||||
$is_vip = (int) aksrt_get_user_vip_level($user_id) > 0;
|
||||
}
|
||||
if (!$is_vip) {
|
||||
$cls = $user_id ? 'pay-vip' : 'signin-loader';
|
||||
$cls = $user_id > 0 ? 'pay-vip' : 'signin-loader';
|
||||
$html .= '<div class="navbar-form navbar-right navbar-vip hover-show inline-block">';
|
||||
$html .= '<a class="but jb-red radius payvip-icon ml10 ' . esc_attr($cls) . '" href="' . ($user_id ? esc_url($vip_url) : 'javascript:;') . '">';
|
||||
$html .= '<a class="but jb-red radius payvip-icon ml10 ' . esc_attr($cls) . '" href="javascript:;"' . ($user_id > 0 ? ' vip-level="1"' : '') . '>';
|
||||
$html .= '<i class="fa fa-diamond em12 mr3" aria-hidden="true"></i>' . esc_html__('开通会员', 'aksrt');
|
||||
$html .= '</a></div>';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user