commerce
commerce copied to clipboard
[4.x]: Gateway setting 'Only allow this gateway to be used for zero value orders?' does not save environment variable
What happened?
Description
When trying to use an environment variable for the setting 'Only allow this gateway to be used for zero value orders?' the control panel does not save the value. Instead it reverts to the control panel Yes/No dropdown defaulting to "Yes".
It will save the setting from within the control panel dropdown. i.e. I can save it to the desired setting of 'no' and vice versa and it does recognise that the relevant environment variable exists but does not retain it upon save.
Steps to reproduce
- Within control panel got to Commerce > System Settings > Gatweays
- Choose a gateway
- Set the dropdown 'Only allow this gateway to be used for zero value orders?' to an environment variable that is saved in the .env file
Expected behavior
Should save the env variable.
Actual behavior
Reverts to control panel options only.
Craft CMS version
Craft Pro 4.2.0.2
Craft Commerce version
4.1.0
PHP version
8.1.8
Operating system and version
Linux 3.10.0-1160.71.1.el7.x86_64
Database type and version
MySQL 10.4.24
Image driver and version
Imagick 3.5.1
Installed plugins and versions