WooCommerce – Disable Product Option based on user role

I am currently building an online ecommerce website using WordPress and WooCommerce.

I have a lot of different things going on, on the website.

We will be selling to retail and wholesale customers.

Our retail customers can choose an option on the product (using simple products and global addons plugin)

Our wholesale customers needn’t choose an option on the product and therefore we need to not show this (as this is a required field for retail but not for wholesale)

Example:

Retail customer: Wants to purchase [ITEM_NAME] with [OPTION_VALUE]

Wholesale Customer: Wants to purchase [ITEM_NAME]

We don’t want the wholesale customers to be able to choose an option and therefore need to hide/remove it if they’re logged in as a wholesale customer.

I have had a look online extensively to find a solution but to no avail.

Does anyone have a solution?

Many thanks.

Read more here:: WooCommerce – Disable Product Option based on user role

Leave a Reply

Your email address will not be published. Required fields are marked *