Groups WooCommerce grants memberships based on products. It automatically assigns a customer to one or more groups based on the products ordered.
This extension allows you to sell Unlimited Memberships and Time-limited Memberships, allowing your customers to access restricted resources during the duration of their group membership.
If you want to charge a monthly subscription fee, you can also use the WooCommerce Subscriptions extension. Groups WooCommerce controls the memberships for the duration of the subscriptions.
To sell memberships with Groups and WooCommerce you need at least WordPress 4.6 and these plugins: