WordPress By User Role - Restrict Page & Redirect to other Page

Job ID: 33424035

Budget: ₹1,500 – ₹12,500 INR

For our membership based site we have two user role types
1) Free user - who can browse the site, but unable to access the checkout page
2) Paid User - Can add to cart & able to access checkout page to make a purchase
We need help in restricting the FREE USER role from accessing the woocommerce checkout page & if tried redirect to the subscription page.

Free User--->Restrict Checkout Page---> Redirect to Membership Page

Help adding this kind of role based capability for the free user to restrict their checkout page access in wordpress/woocommerce.
Related categories: PHP WordPress CSS HTML WooCommerce