John Halsey
John Halsey

Reputation: 2006

Remove "Customer matched shipping zone..." message in woocommerce cart

So whenever a product is added to our basket, a cart message of

Customer matched shipping zone United Kingdom (#3)

and

Registering shipping method instance UK Delivery (#table_rate-3)

but i dont want them. I can't seem to see in the settings in the backend where they can be turned off. And I dont want to remove all messages because the

{product} has been successfully added to your cart

needs to stay. Any help appreciated.

Upvotes: 9

Views: 18263

Answers (4)

Chad Reitsma
Chad Reitsma

Reputation: 176

If you want to leave debug mode enabled (because it disables the shipping cache) but still hide the message, then use this:

//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; 
}

You might need to adjust it for your language. I didn't check to see if it's translated (but it probably is).

Upvotes: 1

David Harvey
David Harvey

Reputation: 694

Paste this after your website's address

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

and uncheck "Enable debug mode"

Upvotes: 2

Ricardo Gonçalves
Ricardo Gonçalves

Reputation: 5114

Just to update the answer, for WooCommerce 3.0.7 the path to enable/disable Shipping Debug Mode is WooCommerce->Shipping->Shipping Options and check/uncheck Enable Debug Mode

Upvotes: 18

A. Push
A. Push

Reputation: 141

To Disable the shipping debug mode you need to go to WooCommerce -> System status -> Tools and uncheck "Shipping Debug Mode" Checkbox and "Save changes"...Then clear the browser cookies and test once.. I hope your Issue will be resolved..

Upvotes: 13

Related Questions