Skip to content

Commit

Permalink
FIX: PS 1.7.7 Legacy Context Init
Browse files Browse the repository at this point in the history
  • Loading branch information
BadPixxel committed May 28, 2021
1 parent 96366a4 commit 01f59fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/splashsync/src/Objects/Order/CRUDTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function load($objectId)
//====================================================================//
// Set Context Currency to Order Currency
if ($object->id_currency) {
Context::getContext()->currency = new Currency($object->id_currency);
Context::getContext()->currency = Currency::getCurrencyInstance($object->id_currency);
}

return $object;
Expand Down
1 change: 1 addition & 0 deletions modules/splashsync/src/Services/MultiShopManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ public static function setContext(int $shopId = null, $force = false): bool
public static function initLegacyContext(): bool
{
if (class_exists(static::$legacyContextClass) && !isset(Context::getContext()->employee->id)) {
/** @phpstan-ignore-next-line */
Context::getContext()->employee = null;
static::$legacyContextClass::getContext();

Expand Down

0 comments on commit 01f59fd

Please sign in to comment.