Force woocomerce checkout page update

Asked

Viewed 63 times

0

Hi. My store does not update the order amount when I change payment method ... How can I force this update on functions PHP or jquery script / ajax etc.?
woocomerce refreshes the page in ajax, but this does not work properly if I use discounts for a specific payment method, because when updating the payment method the value is not being updated correctly, I have to update the window so that this is possible.
I need the window to update when changing the radios Buttons of the forms of payments.
Thank you

Edit

here the Woocomerce payment method function

<?php

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}
?>
<li class="wc_payment_method payment_method_<?php echo $gateway->id; ?>">
    <input   id="payment_method_<?php echo $gateway->id; ?>" type="radio" class="input-radio" name="payment_method" value="<?php echo esc_attr( $gateway->id ); ?>" <?php checked( $gateway->chosen, true ); ?> data-order_button_text="<?php echo esc_attr( $gateway->order_button_text ); ?>" />

    <label for="payment_method_<?php echo $gateway->id; ?>">
        <?php echo $gateway->get_title(); ?> <?php echo $gateway->get_icon(); ?>
    </label>
    <?php if ( $gateway->has_fields() || $gateway->get_description() ) : ?>
        <div class="payment_box payment_method_<?php echo $gateway->id; ?>" <?php if ( ! $gateway->chosen ) : ?>style="display:none;"<?php endif; ?>>
            <?php $gateway->payment_fields(); ?>
        </div>
    <?php endif; ?>
</li>
  • post your code until the moment someone help you...

  • Thank you. I added a section of the function that checks, but it’s hard to post all the files that involve it, but the woocomerce code is open souce, here’s the link to git https://github.com/woocommerce/woocommerce

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.