Skip to content

Commit

Permalink
提示匿名充值用户:新充值将覆盖当前余额
Browse files Browse the repository at this point in the history
  • Loading branch information
swling committed Jul 3, 2024
1 parent cb39af7 commit 863bac4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion includes/module/common/wnd-user-recharge-form.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ class Wnd_User_Recharge_Form extends Wnd_Module_Form {
protected static function configure_form(array $args = []): object {
$form = new Wnd_Form_WP();
if (!is_user_logged_in()) {
$form->set_message(__('匿名充值24小时内有效,无法累加,请即充即用!', 'wnd'), 'is-danger');
$balance = wnd_get_anon_user_balance();
if ($balance) {
$form->set_message(__('<b>注意:</b>新充值将覆盖当前余额:', 'wnd') . '<b>' . number_format($balance, 2) . '</b>', 'is-danger');
} else {
$form->set_message(__('匿名充值24小时内有效,请即充即用!', 'wnd'), 'is-danger');
}
}
$form->add_html('<div class="has-text-centered field">');
$form->add_radio(
Expand Down

0 comments on commit 863bac4

Please sign in to comment.