* Correct the Klarna slug

* Test instructions and release note

* Update testing suggestions with @adrianduffel's suggestion

Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>

Co-authored-by: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com>
This commit is contained in:
Bec Scott 2021-02-25 16:15:57 +10:00 committed by GitHub
parent 1a67c4098b
commit f5718e9b95
4 changed files with 26 additions and 2 deletions

View File

@ -4,6 +4,13 @@
## 2.1.0
### Correct the Klarna slug #6440
1. Set up a new store with a UK address so that Klarna available as a payment processor
2. Go to the "Choose payment methods" task item
3. Set up Klarna. The plugin will install.
4. Click Continue. It should take you back to the payment methods page - previously it wasn't doing anything but a console error was displayed.
### Navigation: Reset submenu before making Flyout #6396
- Download and activate the MailChimp plugin.

View File

@ -99,6 +99,10 @@ class Payments extends Component {
const method = methods.find( ( option ) => option.key === methodName );
if ( ! method ) {
throw `Method ${ methodName } not found in available methods list`;
}
this.setState( {
enabledMethods: {
...enabledMethods,
@ -124,7 +128,15 @@ class Payments extends Component {
return;
}
return methods.find( ( method ) => method.key === query.method );
const currentMethod = methods.find(
( method ) => method.key === query.method
);
if ( ! currentMethod ) {
throw `Current method ${ query.method } not found in available methods list`;
}
return currentMethod;
}
getInstallStep() {
@ -172,6 +184,10 @@ class Payments extends Component {
const { enabledMethods } = this.state;
const method = methods.find( ( option ) => option.key === key );
if ( ! method ) {
throw `Method ${ key } not found in available methods list`;
}
enabledMethods[ key ] = ! enabledMethods[ key ];
this.setState( { enabledMethods } );

View File

@ -18,7 +18,7 @@ class Klarna extends Component {
const { markConfigured, plugin } = this.props;
const slug =
plugin === 'checkout' ? 'klarna-checkout' : 'klarna-payments';
plugin === 'checkout' ? 'klarna_checkout' : 'klarna_payments';
markConfigured( slug );
}

View File

@ -122,6 +122,7 @@ Release and roadmap notes are available on the [WooCommerce Developers Blog](htt
- Fix: Reset Navigation submenu before making Flyout #6396
- Dev: Add a changelog lint check to PRs. #6414
- Fix: Move the shipping input and text 1px lower. #6408
- Fix: Correct the Klarna slug #6440
== 2.0.0 02/05/2021 ==