When toggling the Test mode and the Legacy experience, an error is triggered when saving the settings and they can't be updated anymore.
This isn't happening in 8.0.0.
To Reproduce
Steps to reproduce the behavior:
Go to WC Stripe > Settings tab > General, at /wp-admin/admin.php?page=wc-settings&tab=checkout§ion=stripe&panel=settings
Ensure the checkbox under Enable test mode is checked off
Uncheck the checkbox for Enable test mode
Save the settings
Scroll down to Advanced settings > Legacy checkout experience
If the checkbox under Legacy checkout experience is unchecked, check it off to enable the Legacy checkout experience. Otherwise, disable the Legacy experience and enable it again
Save the settings
Notice there's a notice saying "Error saving settings"
Expected behavior
The settings must continue to be saved after toggling any of our settings.
Additional context
It looks like the settings validation isn't expecting Link to be within the enabled payment method types. This is being added to the payload with the described setting toggling.
I'm unsure if this is happening with a less edgy scenario, but we want to avoid having merchants stuck not being able to save their settings.
Open the browser Network tab, and notice the request for saving the settings fails with a 400
Describe the bug
When toggling the Test mode and the Legacy experience, an error is triggered when saving the settings and they can't be updated anymore.
This isn't happening in 8.0.0.
To Reproduce Steps to reproduce the behavior:
/wp-admin/admin.php?page=wc-settings&tab=checkout§ion=stripe&panel=settings
Expected behavior
The settings must continue to be saved after toggling any of our settings.
Additional context
It looks like the settings validation isn't expecting Link to be within the enabled payment method types. This is being added to the payload with the described setting toggling.
I'm unsure if this is happening with a less edgy scenario, but we want to avoid having merchants stuck not being able to save their settings.
This request has the following payload:
And it has the following response: