improve externalLog

This commit is contained in:
O K
2026-01-21 15:11:29 +02:00
parent adc581282f
commit 948aeb2b1d
2 changed files with 34 additions and 26 deletions

View File

@@ -32,6 +32,9 @@ class Zh_UspsLabelsOverride extends Zh_UspsLabels
// If Bridge returns a valid numeric rate, use it.
// If it returns FALSE (api error, no token, etc), fall back to old logic.
if ($newRate !== false && $newRate !== null) {
if ($this->getHelper()->getModuleHelper()->getConfig('ADD_EASYPOST_FEE') && $newRate > 0) {
$newRate += 0.01;
}
return $newRate;
}
$bridge->externalLog(['calculateRate Failed' => ['params' => $params, 'shipping_cost' => $shipping_cost, 'products' => $products, 'this' => $this]]);