删除 woocommerce 购物车中的“客户匹配的运输区域...”消息

问题描述 投票:0回答:4

因此,每当将产品添加到我们的购物篮时,就会出现

的购物车消息

客户匹配的运输区域英国(#3)

注册运输方式实例 UK Delivery (#table_rate-3)

但我不想要它们。我似乎无法在后端的设置中看到可以关闭它们的地方。我不想删除所有消息,因为

{产品}已成功添加到您的购物车

需要留下来。任何帮助表示赞赏。

wordpress woocommerce
4个回答
18
投票

只是为了更新答案,对于 WooCommerce 3.0.7,启用/禁用运输调试模式的路径是 WooCommerce->Shipping->Shipping Options 并选中/取消选中 Enable Debug Mode


13
投票

要禁用运输调试模式,您需要转到 WooCommerce - >系统状态 - >工具并取消选中“运输调试模式”复选框和“保存更改”...然后清除浏览器cookie并测试一次..我希望您的问题能够得到解决..


1
投票

将此粘贴到您的网站地址之后

/wp-admin/admin.php?page=wc-settings&tab=shipping&section=options

并取消选中“启用调试模式”


0
投票

如果您想启用调试模式但仍隐藏消息,请使用以下命令:

//Filter out the matching zone notice that shipping debug creates.
add_filter('woocommerce_add_message', 'wc_check_notices');
function wc_check_notices($message) {
  if (strpos($message, 'Customer matched zone') !== false) return;
  else return $message; 
}
© www.soinside.com 2019 - 2024. All rights reserved.