How to disable shipping costs based on bool in user_meta
-
Hi, WooComm community. I am working on a custom WooCommerce shop. In my user account data, I have a user_meta field called “freight_inclusive_pricing” that will either be a 1 or a 0. If it’s a 1, I want to disable all shipping costs for that user, period. Any thoughts on where/how to implement this programmatically?
FWIW, I am using a custom shipping plugin that I wrote, which takes cart contents, sends them to an API my client created, then injects the API’s return value as the total shipping cost (they wanted to control shipping tables outside of WordPress). But in the case of a user’s “freight_inclusive_pricing” being 1, I want to ignore that process entirely. Any ideas? Thanks!
- The topic ‘How to disable shipping costs based on bool in user_meta’ is closed to new replies.