这个解决方案是基于在Woocommerce结账页面添加有用的自定义消息。我已经创建了一条自定义消息,但不确定语法是否正确。它在前端显示得很好,但需要帮助检查它。
add_action( 'woocommerce_before_checkout_form', 'print_webcache_notice', 10 );
function print_webcache_notice() {
wc_print_notice( sprintf(
__("Having trouble checking out? Please clear your web browser cache!", "woocommerce"),
'<strong>' . __("Information:", "woocommerce") . '</strong>',), 'success' );
}