In this article, we’ll cover everything you need to know about how to set up WooCommerce shipping by user role on your WordPress website.
If you use WooCommerce to power your e-commerce store, you probably already know that the plugin offers lots of flexible shipping options out of the box. These include multiple shipping zones, the ability to let customers choose between different WooCommerce shipping methods, and the option to offer free shipping based on the amount spent. However, the free WooCommerce plugin doesn’t let you offer different shipping options to different customers based on their user role.
The solution is to use the WooCommerce Wholesale Pro plugin to charge role-based shipping fees. Keep reading to learn how you can add WooCommerce shipping by user role to your e-commerce store in under 15 minutes!
Why offer WooCommerce role-based shipping?
Depending on the type of e-commerce store you’re running, you might consider offering different shipping methods to different customers based on their user role. Here are some use case scenarios where it makes sense to set up WooCommerce shipping by user role:
- Wholesale Let’s say you sell to both retail customers and wholesale buyers. You could offer free shipping to your retail users only, or offer additional bulk shipping or table rate shipping options for logged-in wholesale users. Alternatively, you could offer free shipping to your top-tier wholesale user roles only. You would simply move wholesale users to the top-tier as a special benefit after they spend a certain amount at your store. Normal wholesale users would continue to pay for shipping i.e. they’ll only see flat rate shipping.
- Members-only sites If you run a membership shop alongside your public-facing store, you could sell to regular customers and charge them for shipping while members get access to benefits such as discounted (or free) shipping options. This way, you don’t have to absorb shipping costs for all customers.
- Logged-in customers You can offer discounted shipping rates to customers who are logged into their user accounts. In this case, guest users (i.e. logged out users) would have to pay the full shipping rates. In other words, you can pass on shipping costs to guest users.
There are plenty of ways you can set up WooCommerce shipping by user role depending on the type of store you’re running and the different customers you sell to. And the easiest way to do this is by using the WooCommerce Wholesale Pro plugin.
WooCommerce Wholesale Pro – the perfect way to restrict shipping by user role
WooCommerce Wholesale Pro makes it incredibly easy for e-commerce store owners to set up shipping by user role. The plugin lets you create an unlimited number of user roles and assign different shipping options to each one.
For example, you can decide which shipping options to make available for retail and wholesale customers. You might offer local pickup options and free shipping to your wholesale customers and free shipping to retail customers. This is a great way to personalize the customer experience your WooCommerce store delivers based on the customer’s user role.
In addition, you can use the WooCommerce Wholesale Pro plugin to charge different prices per product and offer customers different payment gateways (i.e. payment methods) based on their user role. This is great for when you need to give wholesale customers the option to make payments via invoice or direct bank transfer, while retail customers can only pay using an online payment gateway such as credit card, Stripe, or PayPal.
How to add WooCommerce shipping by user role
For this tutorial, we’ll assume you already have the free WooCommerce plugin installed on your WordPress website.
Step #1: Get the WooCommerce Wholesale Pro plugin
Get the WooCommerce Wholesale Pro plugin and install and activate it on your WordPress website. You’ll receive the plugin files along with a license key in the confirmation email. Head over to WooCommerce → Settings → Wholesale → General and paste the license key in the License key field:
Click the Save changes button at the bottom of the screen.
Step #2: Create user roles
WooCommerce itself comes with a basic ‘customer’ role, and WooCommerce Wholesale Pro creates your first ‘wholesale’ role when you first install it. You can create as many additional user roles as you’d like.
To do this, head to WooCommerce → Settings → Wholesale → Roles and click the Add new role button to create a new WooCommerce user role. For example, you might create an extra custom role for Wholesale Customers:
You can give each user role a display name, discount, and choose to enable product-specific pricing.
Once you’ve created the user role, click the Save changes button.
Step #3: Configure shipping zones in WooCommerce
Go to WooCommerce → Settings → Shipping → Shipping zones to set up regions and shipping methods from the shipping settings screen. You can create custom shipping zones based on your online store and the shipping service you’d like to offer. For example, you might create a Local Shipping Zone and offer customers local pickup and free shipping options. You can also add shipping zones for sales within your country, international orders, etc.
For each shipping zone, add as many shipping methods as you like:
To do this, click the Add shipping method button and use the dropdown menu to select the shipping method you want to add.
Once you’ve added all the shipping methods for that zone, click the Save changes button to continue. Repeat the process to add shipping options to your other zones.
Step #4: Assign user roles to available shipping methods
Now you’ve set up shipping zones and shipping methods, head over to WooCommerce → Settings → Shipping → Shipping roles in the WordPress admin.
You’ll see the different shipping methods along with the specific user roles that can use them. By default, all your user roles have access to every shipping option. Use this page to delete user roles from specific shipping methods. These roles will be unable to see the shipping method on the WooCommerce checkout page.
Following our example, you can offer local pickup options to your Wholesale Customers and free shipping to the Customer role. It should look something like this:
It’s a good idea to add the Administrator (or the Shop Manager) user role to each shipping method. This makes it easy for store owners to test out the different shipping options to make sure everything is working properly.
That’s it! When you add products to your shopping cart and proceed to the checkout page, you should see the correct shipping methods for your user role. More specifically, here’s what you’ll see if you’re a guest user, retail customer, and wholesale customer: