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