You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the settings screen, when Pay Later messages is initially disabled (or if you disable it first) enabling the option displays settings that apply to both the "Text" and "Flex" layouts, which is incorrect. This is true for the checkout, single product and cart sections.
This is because groupToggle() in settings.js only takes into account settings that immediately depend on the "parent" toggle, but not settings that in turn depend on one of the possibly displayed toggles.
jorgeatorres
changed the title
When enabling Pay Later messages, settings for both layouts (text/flex) are being shown
When enabling Pay Later messages, settings for both layouts (text/flex) are being shown simultaneously
Mar 26, 2021
Describe the bug
On the settings screen, when Pay Later messages is initially disabled (or if you disable it first) enabling the option displays settings that apply to both the "Text" and "Flex" layouts, which is incorrect. This is true for the checkout, single product and cart sections.
This is because
groupToggle()
insettings.js
only takes into account settings that immediately depend on the "parent" toggle, but not settings that in turn depend on one of the possibly displayed toggles.For example
#field-message_flex_color
depends on#ppcp-message_enabled
and so toggling the latter makes the former immediately appear, but that's not correct because#field-message_flex_color
also depends on#ppcp-message_layout
being set toflex
.To reproduce
Screenshots
Screencast illustrating the problem:
Expected behavior
Only settings that apply to the layout chosen should appear.
The text was updated successfully, but these errors were encountered: