Hide ‘FedEx Ground’ for specific zip code
Are you looking to hide FedEx Ground when using our WooCommerce Shipping Plugin for FedEx with Print Label? The following code snippet facilitates you to hide the shipping service – FedEx Ground. You can hide this shipping service in a cart/checkout page for specified zip code.
In the above code:
– $woocommerce->customer->get_shipping_postcode() returns the zip code of destination.
– $zip_array contains the zip codes for which you want to hide FedEx Ground shipping service.
If the destination zip code matches with the zip code in $zip_array, unset the rate for FEDEX_GROUND and return $rates.