Klarna Instant Shopping for WordPress
- Your Klarna account needs to be activated for Klarna Instant Shopping before using this plugin.
- Requires WooCommerce together with either Klarna Checkout for WooCommerce or Klarna Payments for WooCommerce to be used.
To install this plugin you first need to have either Klarna Checkout for WooCommerce or Klarna Payments for WooCommerce installed. You can find the links to this above. You install this plugin just like any other WordPress plugin:
- Download and unzip the latest release zip file.
- If you use the WordPress plugin uploader to install this plugin skip to step 4.
- Upload the entire plugin directory to your /wp-content/plugins/ directory.
- Activate the plugin through the ‘Plugins’ menu in WordPress Administration.
- Navigate to --> WooCommerce --> Klarna Instant Shopping.
- All credentials will be fetched from your main Klarna plugin.
- Debug logging - Tick this box to enable debug logging. The log file can be found by navigating to --> WooCommerce --> Status --> Logs.
- Button on product page - Select if you want the Instant shopping button to be displayed on all WooCommerce product pages or not.
Create a new button ID
- After you have saved the general plugin settings you can create a new Instant shopping button ID.
- Click the Create new button button.
- If the request to Klarna was ok a new Button ID key will be displayed below the button.
Display button on WooCommerce product page
The only thing needed to display the Instant shopping button on WooCommerce product pages is to set the Button on product page setting to Yes. The button will then be displayed above the Add to cart button.
Display button via shortcode
The button can also be displayed on a regular WordPress page via a kiswp shortcode. The parameter needed to tie the button to a specific product is wc-product-id. The shortcode is then added in the following way:
Replace 922092 with the actual product ID you want to tie the button to.
How to retrieve product ID
To get the product id for a product you can do the following:
- Simple product
Hover the product on the Products page in WooCommerce and you will see the ID.
Navigate to the product and click the Variations tab. The ID will then be displayed next to each variation.
Instant shopping button purchase flow
When a purchase is made via the Instant shopping button the order flow is the following:
- Customer clicks the Instant shopping button.
- The checkout is displayed in a popup modal window.
- Customer identifies herself.
- Information about the product, price, shipping method and selected payment method is displayed.
- The customer clicks the Complete your purchase button.
- The order is created in WooCommerce in the background (triggered by a API callback from Klarna).
- Customer is redirected to the order received page for the specific order.
- The order in WooCommerce is tagged as created_via klarna_instant_shopping.
- An order note is added with information about the purchase being made via Klarna Instant Shopping.
- Klarna Instant Shopping is currently only available to customers from one country per pay button. At the moment when creating a button ID in the plugin settings, the Purchase country will be the same as the store base country.
- If customer country (calculated via WooCommerce's geo ip functionality) doesn't match store base country, the Klarna Instant Shopping button won't be rendered.
- Postal number based shipping cost is currently not supported in the plugin.
- Open the Instant Shopping modal window automatically if the customer is redirected to the product page from Instagram or Facebook.
- Support for selling to multiple countries.
- Support for theming the Instant Shopping button.