Free Domestic/Realtime International Shipping

We would like to set up shipping so that every product has free shipping to addresses within the United States, but to addresses within Canada we would like to use the USPS “realtime” shipping calculator. We have set up different locations for the US and Canada, and have a shipping method that displays free shipping for the US. But we cannot figure out how to apply the realtime rates to Canada. Using the same shipping method appears to offer manual, flat-rate options only. Is this possible to do?

There are hooks in the shipping methods.

You should be able to use one of them for the realtime rates and if “$cart.s_country == 'US'” then you can set the rates array to zero which will indicate free shipping for US shipping addresses.