0): ?>

0): ?>

getTimestamp(); printf( /* translators: %s: Next billing date formatted using the WordPress site date format. */ esc_html__('Your next billing date is %s.', 'valuespace'), esc_html(wp_date(get_option('date_format'), $period_end_ts)) ); ?>

time()): ?>

getTimestamp(); printf( /* translators: %s: subscription expiry date. */ esc_html__('Subscription expires on %s.', 'valuespace'), esc_html(wp_date('M j, Y', $cancel_ts)) ); ?>

getTimestamp() - time()) / DAY_IN_SECONDS)); ?>

getTimestamp())) ); ?>
/
getTimestamp())) ); ?>
__('Insufficient permissions.', 'valuespace')]); return; } $redirect_path = isset($_POST['redirect']) && is_string($_POST['redirect']) ? sanitize_text_field(wp_unslash($_POST['redirect'])) : '/pricing'; // Allow only safe internal paths starting with / if (!preg_match('#^/[a-zA-Z0-9/_-]*$#', $redirect_path)) { $redirect_path = '/pricing'; } $action = ltrim($redirect_path, '/') ?: 'dashboard'; $token = vasp_generate_sso_token(false, $action); if (!$token) { wp_send_json_error(['message' => __('Failed to generate SSO token. Please try again or contact support.', 'valuespace')]); return; } $config = vasp_get_config(); $redirect_url = rtrim($config['dashboard_domain'], '/') . '/auth/wp-sso?' . http_build_query([ 'token' => $token, 'redirect' => $redirect_path, ]); wp_send_json_success(['redirect_url' => $redirect_url]); }