Back to Reports

WooCommerce Ignores Logging Level, Creates Debug Logs for Every Order

open Sep 24, 2025 PluginWoocommerce

Summary:

A bug in WooCommerce causes it to generate place-order-debug-* log files for every order placed, even when the global logging level is set to 'Critical'. This occurs because the internal function wc_log_order_step writes debug-level logs that do not respect the configured logging threshold.

The issue leads to an excessive number of log files being created, with stores experiencing 20-30 orders per day accumulating hundreds of files within a short period. This unnecessarily consumes server disk space and clutters the logs directory, making it difficult to find genuine error logs.

Standard WooCommerce filters, such as woocommerce_logger_levels and woocommerce_logger_should_handle, are ineffective at preventing these logs, indicating the logging mechanism for order steps bypasses the usual log level checks.

How to Replicate:

  1. Navigate to WooCommerce → Status → Logging → Settings.
  2. Set the logging level to 'Critical'.
  3. Place a test order on the store.
  4. Check the wp-content/uploads/wc-logs/ directory.
  5. Observe that a new place-order-debug-* log file has been created despite the Critical log level.