Suppos we would like to display cart summary such as product list, total shipping cost, product price , vat etc beside of klarna checkout by using Klarna checkout by woocommerce . We can manage this, however when a user change the shipping option from iframe of Klarna checkout then the checkout summery outside of klarna will not refresh automatically. 

 

Solution:  We can add bellow code into the order_total_change block from klarna-checkout-for-woocommerce\assets\js\klarna-checkout-for-woocommerce.js 

jQuery(document.body).trigger("update_checkout");

Like that

	'order_total_change': function( data ) {
	    kco_wc.log( 'order_total_change', data );
	   /*=== custom refresh checkout =====*/
	  jQuery(document.body).trigger("update_checkout");
        },

After chanhing we can minify js file and paste full code of file to D:\xampp\htdocs\wp\cirk-l.com.live\public\wp-content\plugins\klarna-checkout-for-woocommerce\assets\js\klarna-checkout-for-woocommerce.min.js

That’s it.

If need any cooperations please let me know.

By toihid