Skip to content

Commit 9d54909

Browse files
committed
#191 potential PHP error with contextual price countries settings
1 parent 49b314d commit 9d54909

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release Notes for Shopify
22

3+
## Unreleased
4+
5+
- Fixed a PHP error that could occur when contextual pricing countries aren’t set. ([#191](https://github.com/craftcms/shopify/issues/191))
6+
37
## 6.1.2 - 2025-12-08
48

59
- Fixed a bug where syncing queue jobs could run indefinitely. ([#189](https://github.com/craftcms/shopify/issues/189))

src/models/Settings.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,9 @@ public function setContextualPricingCountries(string $contextualPricingCountries
241241
*/
242242
public function getContextualPricingCountries(bool $parse = true): string
243243
{
244-
return ($parse ? StringHelper::toUpperCase(App::parseEnv($this->_contextualPricingCountries)) : $this->_contextualPricingCountries) ?? '';
244+
$parsedValue = App::parseEnv($this->_contextualPricingCountries) ?? '';
245+
246+
return ($parse ? StringHelper::toUpperCase($parsedValue) : $this->_contextualPricingCountries) ?? '';
245247
}
246248

247249
/**

0 commit comments

Comments
 (0)