php - Remove shipping fee in cart page in woocommerce 3.0?

187

I want to exclude the shipping fee, if there's any, in the cart page. Total should only display the actual total of items and discounts or coupons if there's any.

Please see visual example

I tried adding this code in function.php but only hide the shipping details but the fee is still being added in Total.

function disable_shipping_calc_on_cart( $show_shipping ) {
    if( is_cart() ) {
        return false;
    }
    return $show_shipping;
}
add_filter( 'woocommerce_cart_ready_to_calc_shipping', 'disable_shipping_calc_on_cart', 99 );

My Cart Page after above code - doesn't remove fee from total

People are also looking for solutions to the problem: php - How to create multiple array in Laravel 5?

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.