Disable payment gateway for specific user role in WooCommerce

Disable a specific payment gateway in WooCommerce by adding this to your custom plugin or function.php in your theme. You can also add multiple user roles with the plugin Members and change payment gateway for different roles.