To disable CheckoutWC templates for a particular user role, you can use this snippet of code:
To find the right role name, go to WP Admin > Users and click on the role you want to exclude.
Then check the page URL for the role name. Example URL:
https://yourstore.test/wp-admin/users.php?role=wholesale
For this example, you would change the value of $role_to_disable to ‘wholesale’;