Title: Hard coded weights/dimensions
Last modified: May 10, 2017

---

# Hard coded weights/dimensions

 *  Resolved [ajwish](https://wordpress.org/support/users/ajwish/)
 * (@ajwish)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/hard-coded-weightsdimensions/)
 * Hi,
 * We’ve been using your useful plugin for a good few years now. I’m going through
   the process of upgrading to WooCommerce 3.0 with WooCommerce UPS Shipping 3.2.3.
 * However, when I’ve updated to 3.2.3 from 3.2.1, I no longer get any shipping 
   options returned by the plug-in. I turned debugging on and the error is 111057–
   wrong mesurements/units. The API request is sending LBS/IN when it should be 
   sending KGS/CM.
 * Our configuration is set to KGS/CM, but this is ignored. Changing it and changing
   it back has no effect.
 * I had a look in the plug-in code, and in class-wc-shipping-up.php on line 1488–
 * “< Code >IN</Code >”
 * Inches is being hard-coded into the request? The same is true for LBS on line
   1497.
 * I changed these lines to $this->dim_unit and $this->weight_unit instead, and 
   sure enough – everything works again as it should (with KGS/CM).
 * Please could you look into this? I don’t know if the fix that I have found might
   break other things, or if I’m misunderstanding something about how the plugin
   works?
    -  This topic was modified 9 years, 1 month ago by [ajwish](https://wordpress.org/support/users/ajwish/).
    -  This topic was modified 9 years, 1 month ago by [ajwish](https://wordpress.org/support/users/ajwish/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [niwf](https://wordpress.org/support/users/niwf/)
 * (@niwf)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/hard-coded-weightsdimensions/#post-9120010)
 * [@ajwish](https://wordpress.org/support/users/ajwish/),
 * It seems you are still using an older version of [Plus version](https://www.xadapter.com/product/woocommerce-ups-shipping-plugin-with-print-label/)
   of the plugin. 3.6.6 if the latest version of Plus version. Please update the
   plugin. it will resolve your issue.
 *  Thread Starter [ajwish](https://wordpress.org/support/users/ajwish/)
 * (@ajwish)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/hard-coded-weightsdimensions/#post-9140015)
 * Thanks for your reply,
 * We bought the plugin from WooCommerce – [https://docs.woocommerce.com/document/ups-shipping-method/](https://docs.woocommerce.com/document/ups-shipping-method/)
 * And the changelog and WooCommerce download page says the version was updated 
   on 2017-05-08.
 * *** UPS Shipping ***
 * 2017-05-08 – version 3.2.3
    * Fix – Fatal error on plugin activation.
 * Is this a different version of the plugin? I don’t understand! Thanks.
 *  [niwf](https://wordpress.org/support/users/niwf/)
 * (@niwf)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/hard-coded-weightsdimensions/#post-9140193)
 * [@ajwish](https://wordpress.org/support/users/ajwish/),
 * Unfortunately, this is not our plugin. We are from XAdapter. Please find the 
   link to our plugin – [https://www.xadapter.com/product/woocommerce-ups-shipping-plugin-with-print-label/](https://www.xadapter.com/product/woocommerce-ups-shipping-plugin-with-print-label/)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Hard coded weights/dimensions’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/ups-woocommerce-shipping-method_0073aa.
   svg)
 * [UPS WooCommerce Shipping Method Plugin](https://wordpress.org/plugins/ups-woocommerce-shipping-method/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ups-woocommerce-shipping-method/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ups-woocommerce-shipping-method/)
 * [Active Topics](https://wordpress.org/support/plugin/ups-woocommerce-shipping-method/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ups-woocommerce-shipping-method/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ups-woocommerce-shipping-method/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [niwf](https://wordpress.org/support/users/niwf/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/hard-coded-weightsdimensions/#post-9140193)
 * Status: resolved