Title: Attributes &amp; Variables
Last modified: May 7, 2021

---

# Attributes & Variables

 *  Resolved [cajenkins8](https://wordpress.org/support/users/cajenkins8/)
 * (@cajenkins8)
 * [5 years ago](https://wordpress.org/support/topic/attributes-variables/)
 * I have 8 Maryland Counties as an attribute. Set up another attribute for ZIP 
   Codes. Added variables, as an example Frederick County, 21701. However, all the
   ZIP Codes (for all eight counties) show up in the drop down menu (right now I
   just have two counties entered but used 8 for my example). How do I only get 
   Frederick County ZIP codes to populate instead of the entire universe of ZIP 
   Codes – I’ll have over 200 when I’ve entered them all – thanks for reading and
   hope someone has the answer.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fattributes-variables%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [Hannah S.L.](https://wordpress.org/support/users/fernashes/)
 * (@fernashes)
 * Automattic Happiness Engineer
 * [5 years ago](https://wordpress.org/support/topic/attributes-variables/#post-14414469)
 * Hey there,
 * It sounds like you’re adding zip codes as an attribute to each product. To better
   understand how to help, what’s your end goal with that?
 * > owever, all the ZIP Codes (for all eight counties) show up in the drop down
   > menu
 * Which dropdown menu do you need? A screenshot might be helpful here – I recommend
   [https://snipboard.io](https://snipboard.io) for sharing screenshots – please
   follow the instructions on the page, then paste the URL in your response.
 *  Thread Starter [cajenkins8](https://wordpress.org/support/users/cajenkins8/)
 * (@cajenkins8)
 * [5 years ago](https://wordpress.org/support/topic/attributes-variables/#post-14414597)
 * Thanks, Hannah. I provide sign post installation servive to eight counties in
   Maryland. In Frederick County there are are over 20 zip codes I’d like some of
   those zip codes to have different pricing than the others as an example. Right
   now I have one price which covers each County. For example all Frederick County
   orders are $45 and all Montgomery County orders are $65. You are shown the price
   once the Attribute (County name) is selected on my website. I don’t have any 
   variables set up except for the pricing for each county. I’d like to charge by
   ZIP code. In Montgomery County 20874 is ZIP for Germantown and 20855 for Rockville–
   ideally I’d like to set up different prices for ZIP as 20855 is further from 
   my base – right now as they are both in Montgomery County the charge is the same(
   County attribute)
    -  This reply was modified 5 years ago by [cajenkins8](https://wordpress.org/support/users/cajenkins8/).
    -  This reply was modified 5 years ago by [cajenkins8](https://wordpress.org/support/users/cajenkins8/).
 *  Plugin Support [Hannah S.L.](https://wordpress.org/support/users/fernashes/)
 * (@fernashes)
 * Automattic Happiness Engineer
 * [5 years ago](https://wordpress.org/support/topic/attributes-variables/#post-14452764)
 * Hey there,
 * Thanks for that additional information – I understand that you want to set product
   prices based on the customer’s zipcode.
 * I’d recommend against using attributes to do that, unless you’re looking to use
   custom code to determine the price. I’m not a developer, so I can’t offer much
   advice beyond that it sounds convoluted.
 * I did a bit of searching and found a plugin that could help you with this: [https://barn2.com/woocommerce-zipcode-pricing/](https://barn2.com/woocommerce-zipcode-pricing/)
 * Alternatively, if you’re using shipping, you could use shipping rates to set 
   the extra cost. WooCommerce already knows how to set different shipping rates
   based on zip codes – here’s how to get started with that:
    [https://docs.woocommerce.com/document/setting-up-shipping-zones/](https://docs.woocommerce.com/document/setting-up-shipping-zones/)
 * I hope that helps you in the right direction.
 *  Plugin Support [abwaita a11n](https://wordpress.org/support/users/abwaita/)
 * (@abwaita)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/attributes-variables/#post-14480094)
 * Hi,
    We’ve not heard back from you in a while, so I’m marking this thread as 
   resolved. Hopefully, the above info was helpful!
 * If you have further questions, please feel free to open a new topic.
 * Thanks.

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

The topic ‘Attributes & Variables’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [attributes](https://wordpress.org/support/topic-tag/attributes/)
 * [variables](https://wordpress.org/support/topic-tag/variables/)

 * 4 replies
 * 3 participants
 * Last reply from: [abwaita a11n](https://wordpress.org/support/users/abwaita/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/attributes-variables/#post-14480094)
 * Status: resolved