diff --git a/src/QUI/ERP/Shipping/Debug.php b/src/QUI/ERP/Shipping/Debug.php index 0b0bf0ade5c9aa9bce18bf30c94f39d17efa19d7..24cc099ef15c2a33dc4bb8ebed0d0adf4138e268 100644 --- a/src/QUI/ERP/Shipping/Debug.php +++ b/src/QUI/ERP/Shipping/Debug.php @@ -12,6 +12,7 @@ use QUI\ERP\Shipping\Types\ShippingEntry; use function class_exists; +use function defined; /** * Class Debug @@ -122,6 +123,10 @@ public static function generateShippingEntryDebuggingLog( $result, $debuggingLog ): void { + if (defined('QUIQQER_AJAX')) { + return; + } + if (self::isRuleAlreadyDebugged($Entry->getId())) { return; } diff --git a/src/QUI/ERP/Shipping/Order/Shipping.php b/src/QUI/ERP/Shipping/Order/Shipping.php index 52bfd0457ee192519f793620f903a5a8d4dcf59c..63c5807997966fec4022ca1d3685e6cf7745b4bc 100644 --- a/src/QUI/ERP/Shipping/Order/Shipping.php +++ b/src/QUI/ERP/Shipping/Order/Shipping.php @@ -11,6 +11,7 @@ use function array_merge; use function count; +use function defined; use function dirname; use function implode; @@ -70,7 +71,7 @@ public function getBody(): string $shippingList = $this->getValidShipping(); // debugging logger - if (QUI\ERP\Shipping\Shipping::getInstance()->debuggingEnabled()) { + if (QUI\ERP\Shipping\Shipping::getInstance()->debuggingEnabled() && !defined('QUIQQER_AJAX')) { QUI\ERP\Shipping\Debug::clearLogStock(); $debugStack = []; diff --git a/src/QUI/ERP/Shipping/Types/ShippingEntry.php b/src/QUI/ERP/Shipping/Types/ShippingEntry.php index bb558f96c7fe906aa775c37d58c705ad06fbd1b3..50104b96fa12d0279ecc6f7291b549aa8dfe27a4 100644 --- a/src/QUI/ERP/Shipping/Types/ShippingEntry.php +++ b/src/QUI/ERP/Shipping/Types/ShippingEntry.php @@ -721,7 +721,7 @@ public function getShippingRules(): array } // debug shipping entry / rules - if ($debugging) { + if ($debugging && !defined('QUIQQER_AJAX')) { QUI\ERP\Shipping\Debug::enable(); QUI\ERP\Shipping\Debug::generateShippingEntryDebuggingLog($this, $result, $debuggingLog); QUI\ERP\Shipping\Debug::disable();