-
Notifications
You must be signed in to change notification settings - Fork 192
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
Feature: Add migration step for Currency Switcher #7397
Conversation
public function getCurrencySwitcherStatus(): string | ||
{ | ||
return $this->getMeta('cs_status'); | ||
} | ||
|
||
/** | ||
* @unreleased | ||
*/ | ||
public function getCurrencySwitcherMessage(): string | ||
{ | ||
return $this->getMeta('cs_message'); | ||
} | ||
|
||
/** | ||
* @unreleased | ||
*/ | ||
public function getCurrencySwitcherDefaultCurrency(): string | ||
{ | ||
return $this->getMeta('give_cs_default_currency'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add default values for these? That's the tricky part with meta as we want to expect a return type but it's also possible for the meta to not exist.
Please also updated TestFormMetaDecorator
😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*/ | ||
public function process() | ||
{ | ||
$status = $this->formV2->getCurrencySwitcherStatus(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this v2 status need to be used in v3 form settings to determine global or customize?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. This is a 1-to-1 setting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates, looks good 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passed manual QA tests.
Resolves GIVE-679
Description
This pull request adds a new FormMigration step that migrates Currency Switcher settings from v2 forms to v3.
Affects
Form Migration
Testing Instructions
Pre-review Checklist
@unreleased
tags included in DocBlocks