How to show zero rate value of shipping class in cart page “WooCommerce”

前端 未结 2 1714
生来不讨喜
生来不讨喜 2021-01-13 02:04

I need some help in WooCommerce Shipping method. How can I show the value of shipping class on the cart page. Let me explain little bit my problem.

I added a flat ra

2条回答
  •  粉色の甜心
    2021-01-13 02:11

    Here is what I did.
    1.Open \wp-content\plugins\woocommerce\includes\wc-cart-functions.php
    2.Search for wc_cart_totals_shipping_method_label function
    3.Replace if ( $method->cost > 0 ) with if ( $method->cost >= 0 ) and it should show the shipping cost even if it is set to 0.

提交回复
热议问题