Shipping calculated on cart items weight and cart amount
问题 In a client WooCommerce web site, free shipping method is enabled for orders amount up to 250. I use the code below (from this answer) , to hide other shipping rates when the order amount is over 250, except when there is heavy items in cart. add_filter( 'woocommerce_package_rates', 'conditionally_hide_other_shipping_based_on_items_weight', 100, 1 ); function conditionally_hide_other_shipping_based_on_items_weight( $rates ) { // targeted weight $target_product_weight = 12; $target_cart_amount