Title: Setting for shipment origin postal code
Last modified: December 8, 2025

---

# Setting for shipment origin postal code

 *  [Jordon Rupp](https://wordpress.org/support/users/jordonrupp/)
 * (@jordonrupp)
 * [5 months ago](https://wordpress.org/support/topic/setting-for-shipment-origin-postal-code/)
 * Howdy! It seems that the shipping rates are calculated based on the address in
   the General WooCommerce settings. They are not lining up with our ShipStation
   rates since we fulfill our shipments from an address that is different from our
   store address. Is there a filter or setting that can be utilized to calculate
   the rates based on our actual shipment address? Thanks!
    -  This topic was modified 5 months ago by [Jordon Rupp](https://wordpress.org/support/users/jordonrupp/).

Viewing 1 replies (of 1 total)

 *  Plugin Support [IQComputing Alex](https://wordpress.org/support/users/iqcalex/)
 * (@iqcalex)
 * [5 months ago](https://wordpress.org/support/topic/setting-for-shipment-origin-postal-code/#post-18749422)
 * Hello [@jordonrupp](https://wordpress.org/support/users/jordonrupp/)
 * We hope to implement ShipStation Warehouses soon, where you could set a global
   Warehouse on the Integration page, then override it per Shipping Zone. This would
   allow you to set the fulfillment addresses in ShipStation and the plugin would
   use those, then eventually fallback to the WooCommerce store address if needed.
 * **Disclaimer:** _We take no responsibility for any suggested custom development.
   Use any code or suggestions below entirely at your own risk._
 * In the meantime, you may be able to use a combination of hooks to apply this 
   kind of update. Our plugin uses `WC()->countries->get_base_postcode()` to pull
   in the Shipping Request address:
 *     ```wp-block-code
       'from_country_code'	 => WC()->countries->get_base_country(),'from_postal_code'	 => WC()->countries->get_base_postcode(),'from_city_locality' => WC()->countries->get_base_city(),'from_state_province'=> WC()->countries->get_base_state(),
       ```
   
 * These values do have filter hooks like `woocommerce_countries_base_postcode` –
   You may see the full list of hooks below:
 * [https://woocommerce.github.io/code-reference/files/woocommerce-includes-class-wc-countries.html#source-view.250](https://woocommerce.github.io/code-reference/files/woocommerce-includes-class-wc-countries.html#source-view.250)
 * To ensure that these are temporarily changed (via filter hooks) you may use the
   following 2 action hooks to add and remove the Store Location filters:
 * `woocommerce_before_get_rates_for_packages` and `woocommerce_after_get_rates_for_packages`
 * These 2 action hooks run before and after the `calculate_shipping()` method is
   called on Shipping Methods.
 * In theory, you would hook into the `before` – possibly check against the Shipping
   Method ID (Shipping method is passed as 2nd param) – and add_filter() for the
   updated store address values. Then, you could hook into the `after` and remove_filter()
   to ensure that it doesn’t affect anything else on your store.
 * Hopefully this temporary measure works for you while we implement Warehouse support.
   If you have any questions, or run into any issues, please reply back to this 
   topic and we can assist further. Have a wonderful rest of your week!

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsetting-for-shipment-origin-postal-code%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/live-rates-for-shipstation/assets/icon-256x256.png?rev=3335616)
 * [Live Rates for ShipStation](https://wordpress.org/plugins/live-rates-for-shipstation/)
 * [Support Threads](https://wordpress.org/support/plugin/live-rates-for-shipstation/)
 * [Active Topics](https://wordpress.org/support/plugin/live-rates-for-shipstation/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/live-rates-for-shipstation/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/live-rates-for-shipstation/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [IQComputing Alex](https://wordpress.org/support/users/iqcalex/)
 * Last activity: [5 months ago](https://wordpress.org/support/topic/setting-for-shipment-origin-postal-code/#post-18749422)
 * Status: not resolved