【发布时间】:2021-06-07 09:41:27
【问题描述】:
此方案基于Add an informative custom message in Woocommerce Checkout page
我创建了一条自定义消息,但不确定语法是否正确。它在前端显示正常,但需要帮助检查它。
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' );
}
【问题讨论】:
标签: php wordpress woocommerce checkout notice