Title: Adding extra fee by user role?
Last modified: December 13, 2017

---

# Adding extra fee by user role?

 *  Resolved [officeasst](https://wordpress.org/support/users/officeasst/)
 * (@officeasst)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/adding-extra-fee-by-user-role/)
 * Hi, on this website and another website I’m trying to figure out how to add an
   extra fee based on user role. We charge an extra shipping fee for residential
   addresses, and I was thinking if I could make a role for it, there should be 
   some way to automatically add a standalone fee at checkout. Not sure how to do
   that, though. Any suggestions? (I listed one site, but this would apply to 2 
   sites.) Thanks.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fadding-extra-fee-by-user-role%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [Hannah S.L.](https://wordpress.org/support/users/fernashes/)
 * (@fernashes)
 * Automattic Happiness Engineer
 * [8 years, 5 months ago](https://wordpress.org/support/topic/adding-extra-fee-by-user-role/#post-9781787)
 * > We charge an extra shipping fee for residential addresses
 * Is there any way to tell from the address, for example by zip code, if it’s residential?
   In that case, you could handle this using shipping zones.
 * You can add a fee based on the user role, but you’d need to manually set the 
   role before the customer would see the fee. Here’s a snippet of code to add the
   fee:
    [http://www.remicorson.com/add-custom-fee-to-woocommerce-cart-dynamically/](http://www.remicorson.com/add-custom-fee-to-woocommerce-cart-dynamically/)
 *  Thread Starter [officeasst](https://wordpress.org/support/users/officeasst/)
 * (@officeasst)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/adding-extra-fee-by-user-role/#post-9782965)
 * Hi, Hannah, thanks for that. I am also using the plugin User Role Editor, so 
   would that count as manual?
 * Also, how would I tweak the specifics of this code (assigning it to the role,
   setting the fee amount, and changing the fee name that shows on the frontend)?
   I usually know enough to find my way around in code, but I don’t know how to 
   write code myself.
 * Thanks!
 *  [Dustin Hartzler](https://wordpress.org/support/users/dustinhartzler/)
 * (@dustinhartzler)
 * Automattic Happiness Engineer
 * [8 years, 5 months ago](https://wordpress.org/support/topic/adding-extra-fee-by-user-role/#post-9783174)
 * You would use the code in Remi’s post and change the text `Custom` to the name
   of your user group.
 * The 5 in the text equates to $5 (or whatever currency) and will display at checkout.
 *  Thread Starter [officeasst](https://wordpress.org/support/users/officeasst/)
 * (@officeasst)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/adding-extra-fee-by-user-role/#post-9783230)
 * OK, thanks Dustin. And applying to the user role? How would that connect? Seems
   like you’d have to add another line of code or something to specify it.
 *  Thread Starter [officeasst](https://wordpress.org/support/users/officeasst/)
 * (@officeasst)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/adding-extra-fee-by-user-role/#post-9787054)
 * Oh wow, I am so stupid. Sorry guys, I just looked at this again and realized 
   you answered my question already. Works beautifully so far! Thanks for the tip!
 *  Plugin Support [Hannah S.L.](https://wordpress.org/support/users/fernashes/)
 * (@fernashes)
 * Automattic Happiness Engineer
 * [8 years, 4 months ago](https://wordpress.org/support/topic/adding-extra-fee-by-user-role/#post-9827080)
 * Thanks for letting us know – I’m glad to hear it!
 *  Thread Starter [officeasst](https://wordpress.org/support/users/officeasst/)
 * (@officeasst)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/adding-extra-fee-by-user-role/#post-9856967)
 * I actually may need more help with this after all, guys. I just had another customer(
   who is not in my Residential Fee group) place an order, and a residential fee
   got added. I`ll process it, since the payment has been processed, but I may have
   missed something. Is there a way to ensure that my fee only applies to the user
   group “Residential Fee”? I don’t want to charge other people extra, just that
   one group.
 * Thanks!

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

The topic ‘Adding extra fee by user role?’ 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

 * [extra fee](https://wordpress.org/support/topic-tag/extra-fee/)

 * 7 replies
 * 3 participants
 * Last reply from: [officeasst](https://wordpress.org/support/users/officeasst/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/adding-extra-fee-by-user-role/#post-9856967)
 * Status: resolved