Actions
↑ Back to top
Sometimes you need to change the design of the checkout page and with Klarna Checkout for WooCommerce it is possible in a couple of different ways.
1. Simple CSS changes
↑ Back to top
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #kco-wrapper #kco-order-review, | |
| #kco-wrapper #kco-iframe { | |
| width: 100%; | |
| float: none; | |
| clear: both; | |
| } |
2. Remove, add and move with action hooks
↑ Back to topThe checkout template file
templates/klarna-checkout.php On the Klarna Checkout template page, there are several action hooks you can use to add code or content. These hooks have the following names:kco_wc_before_checkout_formkco_wc_before_order_reviewkco_wc_after_order_reviewkco_wc_before_snippetkco_wc_after_snippetkco_wc_after_checkout_form
Through these action hooks, you can easily add information to different locations on the checkout page.
3. Create your own template file
↑ Back to toptemplates folder in the plugin. To overwrite the file, copy it from the plugin, then paste it into the /woocommerce folder in your theme. Now you have the opportunity to make the changes you want. Keep in mind that the action hooks kco_wc_before_checkout_form and kco_wc_after_snippet must remain for the plugin to work properly.
Filters
↑ Back to topModify order data sent to Klarna
↑ Back to topkco_wc_api_request_args as described in the following example:
https://gist.github.com/krokedilgists/8b9130c543098eef0c4b40ae1f29d40d
Information about available parameters in Klarnas API can be found here.
Â