Answer the question
In order to leave comments, you need to log in
How do I update the shipping cost on the checkout page?
I am customizing the checkout page, adding a block where, as planned, the cost of the selected delivery should be displayed.
It looks like this:
<div class="subtotal-form__shipping">
<span class="subtotal-form__shipping-label">Доставка: </span>
<span class="subtotal-form__shipping-price">
<?php if (WC()->cart->get_shipping_total() && WC()->cart->get_shipping_total() > 0) :
echo WC()->cart->get_shipping_total(); ?>
<span class="woocommerce-Price-currencySymbol">
<?php echo get_woocommerce_currency_symbol(); ?>
</span>
<?php else :
echo 'бесплатно';
endif; ?>
</span>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question