• Resolved magsmyk00

    (@magsmyk00)


    For the purposes of the project I included shipping methods in order form.
    I used the following code for this:

    <?php if ( WC()->cart->needs_shipping() && WC()->cart->show_shipping() ) : ?>
    
    					<?php do_action( 'woocommerce_review_order_before_shipping' ); ?>
    
    					<?php wc_cart_totals_shipping_html(); ?>
    
    					<?php do_action( 'woocommerce_review_order_after_shipping' ); ?>
    
    					<?php endif; ?>

    Shipping methods do not update when you change the billing and shipping fields on the form, only the shipping amount in the summary changes.

    I can’t use location.reload().

    Could you help me to solve the problem?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter magsmyk00

    (@magsmyk00)

    By default, the shipping method selection is in the WooCommerce cart.
    I moved it to the checkout to the order form above billing fields.
    I placed the above-mentioned code in the theme file: /woocommerce/checkout/form-checkout.php

    Shipping methods are displayed correctly – their names and prices, but they do not update for a given country
    when changing the shipping/billing country field.

    Plugin Support katerinaz – a11n

    (@katerinaz)

    Hey there @magsmyk00

    Please note that on our end, custom coding?is not something we can assist with directly. However, we’ll keep this thread open for a bit to see if anyone from the community can share more insights.

    If you have any other questions related to development or custom coding, don’t hesitate to reach out to some of the great resources we have available for support. The WooCommerce community is filled with talented open-source developers, and many of them are active on the channels listed below:

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to refresh shipping methods on the order form?’ is closed to new replies.