O
O
Oleg2021-03-26 23:11:55
WordPress
Oleg, 2021-03-26 23:11:55

woocommerce. How to remove the shipping method that is duplicated in the right column?

After updating woocommerce, a block appeared in the right column where delivery methods are indicated. This block is duplicated on the left. How to remove the block with the choice of delivery, which is on the right in the sidebar? If you just make display: none, then this is not correct and the choice of the method on the left works crookedly.

605e3fae740a3472129266.png

I found where to change the delivery method. In the cart-shipping.phpBut template, this template draws output to both the left side and the sidebar.

On the left it looks like 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; ?>


And on the right like this:

<?php do_action('woocommerce_checkout_order_review'); ?>

If I delete this line, then all the information in the sidebar disappears altogether.

Screenshots of it all:
605e3fc849564742524399.png
605e3fd0df2e1616765115.png
605e3fd828793655024539.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Borisenko, 2021-03-29
@makbori

remove shipping from this file total-cart.php
<?php wc_cart_totals_shipping_html(); ?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question