Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Remove Shipping tr from cart page

$
0
0

Replies: 0

Hi Author,

I have checked your plugin, It helps remove the shipping, but you are just subtracting the shipping price from subtotal.

I have checked the plugin’s code. You should add the below line to remove the shipping tr from the checkout page:

add_filter( 'woocommerce_cart_needs_shipping', '__return_false', 10 );

Add the code in the file woocommerce-remove-shipping-from-cart-totals.php line no #40.

The function will look like this:

function woocommerce_after_calculate_totals( $cart ) {
    // Removing the shipping from the cart total
    $cart->total = $cart->total - $cart->shipping_total;
    add_filter( 'woocommerce_cart_needs_shipping', '__return_false', 10 );

}

Kind Regards

Thanks


Viewing all articles
Browse latest Browse all 59525

Trending Articles