TaxJar _log() writes to debug.log unconditionally, no toggle
-
Plugin: WooCommerce Tax (formerly WooCommerce Shipping & Tax) File: classes/class-wc-connect-taxjar-integration.php Environment: WordPress 6.x, WooCommerce 9.x, PHP 8.4, MariaDB 10.11, Cloudways
The _log() method (line 443) writes to the WordPress debug.log unconditionally. There are approximately 25 log calls throughout the TaxJar integration class that fire on every tax calculation, including routine messages like “:::: TaxJar Plugin requested ::::” (line 1538), “:::: TaxJar API called ::::” (line 1579), full API request/response body dumps, and tax rate lookup details.
The debug toggle in WooCommerce Tax settings does not gate these calls. The _log() method on line 443 passes every message straight through to $this->logger->log() with no conditional check.
This floods debug.log on active WooCommerce stores and makes it difficult to identify actual errors during server troubleshooting.
Requested fix: Add a conditional check in _log() that respects the existing debug setting so informational logging only fires when explicitly enabled. Error-level logging via _error() should remain always-on since those messages (missing countries, bad zip formats, failed API responses) are genuinely useful.
You must be logged in to reply to this topic.