我正在显示logged in 用户及其order history 在前端。最初,当没有订单历史记录时,我通常会得到一个空白页。但是,使用此代码后
if ( !$customer_orders ) :
echo esc_html("You haven\'t redeemed any offer");
endif;
我可以在前端显示一条消息,上面写着;您尚未赎回任何出价”;I want this page to redirect after 5 seconds on if this message is being displayed, otherwise users will get to see their order details.有人可以提出建议或扩展此代码吗?查看图像以供参考Where redirection has to happen after 5 seconds