Title: Get Package Types
Last modified: October 12, 2020

---

# Get Package Types

 *  [darkallman](https://wordpress.org/support/users/darkallman/)
 * (@darkallman)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/get-package-types/)
 * How can I get from a custom piece of code the packages types defined by MyParcel?
   
   I see this: `array_combine(WCMP_Data::getPackageTypes(), WCMP_Data::getPackageTypesHuman())`
 * But i’m not sure what to ‘use’ or what namespace to call….

Viewing 1 replies (of 1 total)

 *  [Robin de Laater](https://wordpress.org/support/users/robindelaater/)
 * (@robindelaater)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/get-package-types/#post-13586085)
 * Beste [@darkallman](https://wordpress.org/support/users/darkallman/),
 * I think you want to use `use WCMP_Data;` and `WCMP_Data::getPackageTypesHuman()`.
   This would return the package types as strings. `WCMP_Data::getPackageTypes()`
   would return the corresponding integer, eg: 1 for package, 2 for mailbox, 3 for
   letter and 4 for digital stamp.

Viewing 1 replies (of 1 total)

The topic ‘Get Package Types’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-myparcel/assets/icon-256x256.png?rev=2898538)
 * [MyParcel](https://wordpress.org/plugins/woocommerce-myparcel/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-myparcel/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-myparcel/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-myparcel/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-myparcel/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-myparcel/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Robin de Laater](https://wordpress.org/support/users/robindelaater/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/get-package-types/#post-13586085)
 * Status: not resolved