1. Home
  2. Knowledge Base
  3. WooCommerce Members Only
  4. Roles
  5. Restrict or allow shipping methods by user role
  1. Home
  2. Knowledge Base
  3. WooCommerce Members Only
  4. Restrict or allow shipping methods by user role

Restrict or allow shipping methods by user role

You can choose to restrict or enable shipping methods by user roles. In WooCommerce > Settings > Members Only > Shipping Methods, you’ll see a list of all the shipping methods enabled on your site.

Under each shipping method, there’s a field for ‘Restricted roles’ and a field for ‘Permitted roles’.

Shipping methods by user role

If you want to prevent users with specific roles from using a certain shipping method, enter the roles in the ‘Restricted roles’ field.

If, on the other hand, you want to enable the shipping method for certain roles, enter those roles in the ‘Permitted roles’ field.

You can also add a filter to ignore any non-logged-in users from these rules:

<?php
add_filter( 'wcmo_ignore_shipping_for_non_logged_in', '__return_true' );

Was this article helpful?

Related Articles