Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gddotorg opened this issue Nov 26, 2024 · 1 comment
Open

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

gddotorg opened this issue Nov 26, 2024 · 1 comment

Comments

@gddotorg
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant