Recent updates to error handling and optional remote error logging

As part of our commitment to improving WooCommerce stability and user experience, we’re excited to share updates to our error handling and introduce a new optional remote error logging system as part of the upcoming WooCommerce 9.4 release. These updates are designed to make WooCommerce more robust and simplify troubleshooting for developers and store owners.

Who is this for?

These improvements only affect stores that have tracking turned on.

To learn more about the data we track and our privacy practices, visit WooCommerce Usage Tracking. Stores can opt in or out of sharing data with us for analytics purposes, by going to WooCommerce > Settings > Advanced > WooCommerce.com and selecting or deselecting the checkbox to Enable Usage Tracking.

Coming soon in WooCommerce 9.4: Optional Remote Error Logging

In WooCommerce 9.4, we will be introducing an optional remote error logging system to further enhance stability and support, which is only available if users who have opted into usage tracking.

  • Remote Error Logging Epic #49276
  • Implement server-side remote error logging #49599
  • Add JS remote logging package #49702

Benefits

This remote logging feature will provide several benefits:

  1. Faster Fixes: Detailed error data helps us resolve issues more swiftly.
  2. Improved Stability: Early detection of errors leads to a more stable WooCommerce experience.
  3. Better Insights: Aggregated error data informs our development priorities, ensuring we focus on areas that matter most to users.

Data Privacy and Security

We take user privacy seriously and have implemented several measures to protect it:

  1. Opt-in Only: Remote logging is only enabled for users who’ve explicitly opted into usage tracking.
  2. Data Sanitization: File paths in error traces and URL strings are sanitized to remove any sensitive information.
  3. Advanced Data Protection: We automatically redact sensitive information including:
    • Email addresses
    • Phone numbers
    • Credit card numbers
    • IP addresses
  4. Limited Data Collection: We only collect error diagnosis and resolution information. Query parameters in URL will also be replaced with placeholders to avoid collecting sensitive information.

To learn more about the data we track and our privacy practices, visit WooCommerce Usage Tracking.

The remote logging system captures different sets of information based on whether an error occurs server-side (PHP) or client-side (JavaScript).


Revision History

WC 9.5: Important privacy enhancement updates:

  • Now only logging errors specifically caused by WooCommerce (previously logged all errors containing WooCommerce files in the trace)
  • Added automatic redaction of sensitive user data including email addresses, phone numbers, credit card numbers, and IP addresses

What information are we logging?

Common Fields

All logs include:

  • host: The site’s hostname
  • request_uri: The URL of the request
  • message: The error message
  • trace: The error stack trace
  • wc_version: WooCommerce version
  • wp_version: WordPress version
  • tags: Identifiers for the type of error (e.g., PHP, JS)

PHP-Specific Fields

Server-side logs additionally include:

  • php_version: The PHP version running on the server
  • store_id: A unique identifier for the WooCommerce store

JavaScript-Specific Fields

Client-side logs additionally include:

  • browser_version: The user’s browser version
  • browser_name: The name of the user’s browser

Can I disable this feature?

The remote logging feature is disabled by default when you install WooCommerce. It is only enabled if you opt into usage tracking.

If you’ve opted in to usage tracking and want to disable remote error logging, you can do so by setting the woocommerce_feature_remote_logging_enabled option to no. For example, you can run wp option update woocommerce_feature_remote_logging_enabled no via WP CLI to disable this feature. This will not impact any other tracking features.

Improved Error Handling in WC Admin

With WooCommerce 9.1, we delivered error handling enhancements in WC Admin pages, making them more stable and resilient.

We added a global error boundary at the top of the WC Admin component tree. This catches unhandled errors, preventing the entire WC Admin app from crashing.

  • Add global ErrorBoundary component for handling errors in react admin #48250
  • Wrap activity panels in error boundary #48415

Benefits

  • Prevents full app crashes due to unhandled errors
  • Displays a user-friendly error message
  • Offers users the option to reload the page or seek help from the community

Fatal error without error boundaries

Fatal error occurs with error boundaries

We’ve also introduced an experimental generic error boundary component in the @woocommerce/components package. This component isolates errors to specific parts of the UI, allowing other components to continue functioning normally.

Isolate errors to the specific component

Feedback and Contributions

We value your feedback and contributions. If you have questions, or suggestions, or want to contribute, drop a comment below or join the GitHub discussion on remote error logging. We’d love to hear from you!

Stay tuned for more updates as we continue to enhance WooCommerce for developers and users alike!


Keep yourself in the loop!

This field is hidden when viewing the form
This field is hidden when viewing the form
This field is hidden when viewing the form


4 responses to “Recent updates to error handling and optional remote error logging”

  1. It is UNBELIVABLE that you do not provide an easy way to disable the Remote Loggin, finally have a plugin update (viva.com) so that we can use Hipos only to now have an annoying “⚠ This plugin is incompatible with the enabled WooCommerce feature ‘Remote Logging’, it shouldn’t be activated. Manage WooCommerce features”

    on top of that, there is no way to easily disable this feature without having to install WP CLI!?

    no easy codesnippet provided or other way to do it in this article either.

    Sectiously fix this!

    1. Barry Hughes Avatar
      Barry Hughes

      ⚠ This plugin is incompatible with the enabled WooCommerce feature ‘Remote Logging

      When you see this warning, does it also mention High-Performance Order Storage, or does it only reference Remote Logging?

      If the first of those is true, this may be the result of a small bug or oversight in the feature management code and—as far as it relates to remote logging—can be ignored.

  2. Barry Hughes Avatar
    Barry Hughes

    Something noted over here is that this feature is only enabled if you have opted in to tracking. To verify if this is the case, just visit WooCommerce ‣ Settings ‣ Advanced ‣ WooCommerce.com and then disable tracking if you need to.

  3. I am having the exact same problem. I have disabled remote loggin from settings > advcanced > woocommerce.com but still getting this error.

Leave a Reply

Your email address will not be published. Required fields are marked *