title: Apply a discount for a specific user role in Woocommerce
body: <p>I have a woocommerce store, with 3 user roles, I want to provide a 10% discount on the cart total only for a user role 'company'.</p>
  
  <p>I found <em>"<a href="https://stackoverflow.com/questions/51352055/percentage-discount-based-on-user-role-and-payment-method-in-woocommerce/51352908#51352908">Percentage discount based on user role and payment method in Woocommerce</a>"</em> answer that is very neer of what I need, but don't know how to modify the code to feet my needs, as it contains also a condition based on payment method and displaying the discount only at checkout, but I need it to display in cart as well.</p>