CUSTOM SHIPPING ENDPOINT: mixing live rates and flat rates

We are setting up for the custom shipping end point (php), and we need to show some (FedEx and USPS ) live rates in some cases; and some flat rates in other cases.

In the admin--> shipping panel we set up for fedex , USPS and custom shipping end points; and in the relevant product categories, for live shipping.

in cases where we need flat rates, the custom end point does it job and adds the flat rates, but we can not get rid of the Fedex/UPSS rates even though we have a

where we would need it.

I guess this means the the live rates are pulled in parallel with the custom shipping endpoint rates, and we would need to call the Fedex / USPS rates from within the custom shipping end point to be able to manipulate them - if that can be done ? or is there some other way to achieve this ?
  • fc_adamfc_adam FoxyCart Team

    Your assumption there is correct - the custom shipping endpoint is treated just like a normal live rate shipping provider, and all fetched at the same time. As such, the custom shipping endpoint can't impact those other live rates - the different functions available from the custom shipping endpoint helper are just there for altering the custom rates in your endpoint logic.

    What you'd want to do instead is make use of the live rate shipping modification snippet to hide returned rates in the different scenarios you need. You'd still use the custom shipping endpoint to create your custom rates - and just use the live rates snippet to hide the rates you don't need displayed. Details on the snippet are available here:
Sign In or Register to comment.