Last active
August 16, 2017 09:32
-
-
Save NiklasHogefjord/3b9a12fec1eb2e5f72008a88b73e5fbd to your computer and use it in GitHub Desktop.
Updated compatibility file for WCML (https://wordpress.org/plugins/woocommerce-multilingual/) used to get Klarna Checkout payment gateway (https://woocommerce.com/products/klarna) to work with WCML/WPML multi currencies in WooCommerce.
This file contains 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
<?php | |
class WCML_Klarna_Gateway{ | |
public function add_hooks(){ | |
add_filter( 'wcml_multi_currency_ajax_actions', array( $this, 'ajax_action_needs_multi_currency' ) ); | |
} | |
function ajax_action_needs_multi_currency( $actions ){ | |
$actions[] = 'klarna_checkout_cart_callback_update'; | |
$actions[] = 'klarna_checkout_coupons_callback'; | |
$actions[] = 'klarna_checkout_remove_coupon_callback'; | |
$actions[] = 'klarna_checkout_cart_callback_remove'; | |
$actions[] = 'klarna_checkout_shipping_callback'; | |
$actions[] = 'kco_iframe_shipping_option_change_cb'; | |
$actions[] = 'klarna_checkout_order_note_callback'; | |
$actions[] = 'kco_iframe_change_cb'; | |
$actions[] = 'kco_iframe_shipping_address_change_v2_cb'; | |
$actions[] = 'kco_iframe_shipping_address_change_cb'; | |
return $actions; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment