So you have some perishable products and non-perishable products in your shop, and you want to make sure that the perishable products can only be ordered with a shipping method that is either 1 or 2 days.
So this means that to some nearby states, the ground shipping method can get there within 1-2 days, so you want to make ground available to those areas, but you want to restrict the ground rate from the states where it will be 3+ days in transit.
Here is how you will do this.
First figure out which states you don't want to show a ground rate for.
The easiest way is to check your UPS/FedEx transit time map.
We'll use UPS as our example, shipping from NYC.
There are a few states that have both 2 and 3 day transits:
You should decide whether you want to count them for Ground or not.
In the above example I would throw in Kentucky and Michigan into the 2 day category because its just a small section with low population. I may consider keeping Illinois for Ground because the main population center, Chicago, is within 2 days.
I may be willing to risk making Ground available for southern Illinois because the chance of someone ordering from there is low, and in the rare case that someone does, I can just upgrade their shipping and pay the difference.
Or, you can decide to be really strict, and exclude any state that has any green/3-day transit time in it at all. It's up to you the nature of your business.
With that in mind I come up with this list of states where I don't want to offer Ground when there is a perishable product:
HI, AK, CA, OR, WA, MT, ID, WY, NV, UT, AZ, NM, CO, ND, SD, NE, KS, OK, TX, MN, IA, MO, AR, LA, WI, MS, AL, FL
Set-up your shipping rates:
In the app, Add Rates to the Default product group.
Add all the rates you want to offer. It may look something like this after you add all the options.
Then edit the Ground rate.
On the edit rate page, scroll down to the Rules section, and choose the rule type Hide rate when..., and then click Add Rule
Choose the variable 'State/Province'
And put in a list of the states that shouldn't get a ground option, using the abbreviations as comma separated list.
Then Add Condition
Then choose choose one of the product variables ( Title, Vendor, SKU ) to use to target the perishable items. ( What if I can't target products with Title, Vendor, or SKU )
You can use a comma separated list to target multiple kinds of products.
Then save the Rule, and Save the rate.
When the rate is saved with the rule, you'll see its marked with This rate is conditionally hidden.
You can click Show Rules at the top to have a glance at the rule being applied to that rate.
This means that UPS Ground will be hidden whenever there is any product in an order with a title that contains 'fish', or 'oysters', or 'ice cream', and the state is any state from that list.
If there are no products with such text in their title then UPS Ground will show for any state.
If there are products with such text in their titles, but the state isn't on that list, UPS Ground will also show.