Change or Disable WooCommerce Cart / Checkout Options based on User Role and Country

Given below is the code snippet to Disable Checkout Options based on User Roles and Country.

We can check the user role based on the unique capabilities it has. Below snippet will enable the Payment Option “CC Avenue” only if the customer is from any other countries.

Check out this WordPress article for More information on Roles and Capabilities.

Leave a Reply