feat(pay): VIP package purchase service and user-center open flow
Add AKSRT_Vip_Service (GET/POST /pay/vip), activate aksrt_vip_level/expires on order paid, package UI in credits panel, and deep-link VIP CTA to credits tab.
This commit is contained in:
@@ -62,7 +62,9 @@ if ($captcha_active && function_exists('aksrt_is_captcha_enabled_for') && !aksrt
|
||||
}
|
||||
$balance = (int) ($gate_data['balance'] ?? (is_user_logged_in() && class_exists('AKSRT_Credits') ? AKSRT_Credits::balance(get_current_user_id()) : 0));
|
||||
$login_url = (string) ($gate_data['login_url'] ?? wp_login_url(get_permalink($post_id)));
|
||||
$vip_url = function_exists('aksrt_get_user_center_url') ? aksrt_get_user_center_url() : home_url('/');
|
||||
$vip_url = function_exists('aksrt_get_user_center_tab_url')
|
||||
? aksrt_get_user_center_tab_url('credits')
|
||||
: (function_exists('aksrt_get_user_center_url') ? aksrt_get_user_center_url() : home_url('/'));
|
||||
|
||||
$is_need_login = $gate_blocked && $gate_code === 'aksrt_need_login';
|
||||
$is_need_vip = $gate_blocked && $gate_code === 'aksrt_need_vip';
|
||||
|
||||
Reference in New Issue
Block a user