craftcms / commerce

Fully integrated ecommerce for Craft CMS.
https://craftcms.com/commerce
Other
226 stars 170 forks source link

[5.x]: Can't set environment variables in store settings #3786

Open gddotorg opened 3 days ago

gddotorg commented 3 days ago

What happened?

Description

When I try to change my store settings to environment variables, the values are automatically set to false after saving. For example, auto set new cart address I set the environment variable COMMERCE_AUTO_SET_NEW_CART_ADDRESS and the value is true. After saving, the variable has disappeared and the field has the value false. If I manually set it to true, it works as expected.

Steps to reproduce

  1. Define env variable COMMERCE_AUTO_SET_NEW_CART_ADDRESS and set true. COMMERCE_AUTO_SET_NEW_CART_ADDRESS=true
  2. Go to my store settings (/admin/commerce/settings/stores/1#settings)
  3. Select env variable in field "Auto Set New Cart Addresses" and save changes.
  4. "Auto Set New Cart Addresses" Field has value false.

Expected behavior

"Auto Set New Cart Addresses" should have env variable COMMERCE_AUTO_SET_NEW_CART_ADDRESS as value

Craft CMS version

5.5.3

Craft Commerce version

5.2.6

PHP version

8.2.15

Operating system and version

Linux 6.5.0-15-generic

Database type and version

MySQL 8.0.33

Image driver and version

Imagick 3.7.0 (ImageMagick 6.9.11-60)

Installed plugins and versions

No response

linear[bot] commented 3 days ago

PT-2325 [5.x]: Can't set environment variables in store settings