AUTO update @ payment method change2
-
Hi awesome plugin thanks alot.
I have customized a function to add addition fee when someone chose a specific payment method. it is adding fine everything is working fine just it doesn’t display, the fee on the checkout totals untill i change the shipping method to tiger the update. before i installed the plugin i used this code and it was working fine with the standard woocommerce checkout.
add_action('wp_footer', 'minicart_checkout_refresh_script'); function minicart_checkout_refresh_script(){ if ( is_checkout() && ! is_wc_endpoint_url() ) : ?> <script type="text/javascript"> (function($){ $(document.body).on('click', 'input[name="payment_method"],input[name^="shipping_method"],', function(){ $(document.body).trigger('update_checkout').trigger('wc_fragment_refresh'); }); })(jQuery); </script> <?php endif; }
I have tried manythings to get this working but i think you guys have a simpler answer.
best regards thank you,
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘AUTO update @ payment method change2’ is closed to new replies.