The Forms plugin enables the creation of forms to register users from your website’s front-end. Using both WooCommerce and Toolset Forms Commerce plugins, you can also sell user registration. This enables you to create membership sites and sell subscriptions to your site’s services, as well as to implement anything else that requires charging payments for user registration.
This document explains how to charge for user registration on a membership site. The information provided here can be adjusted to suit any other type of site that involves charging for user registration.
To enable the charging of user registration on your site you need three plugins:
- WooCommerce – Creates the product that we want to sell. In our example, it’s the membership. We also use it to set up payment options and all other e-commerce settings.
- Toolset Forms – Creates the front-end user registration forms.
- Toolset Forms Commerce – Connects the User Registration forms with WooCommerce and automatically creates orders when users submit the forms on the front-end.
Since Forms will be in charge of creating the newly registered user accounts, it is important to set the correct account-creation options in WooCommerce settings.
|In the WordPress administration, go to the WooCommerce → Settings page and click the Accounts & Privacy tab.|
In the Guest checkout section select the first option. Deselect the first two options in the Account creation section.
To charge for membership, you must first create a WooCommerce product for it.
To use WooCommerce in your site, you will need to set up additional options for it, such as payment gateways and currency. If you are new to WooCommerce, please first read about configuring WooCommerce settings.
You must now create the actual form that will enable user registration on the front-end. If you are new to Forms, check out our guide about setting up user registration.
|In the form’s Settings section, select Create new user and define the user role that will be assigned to the user’s registration.|
Under the After user submits this form option select Go to checkout page.
|In the next step, your user form will be auto-generated. Use the drag-and-drop editor to add user metadata and custom fields to it.|
Read more on how to build user forms with Forms.
|In the final step, you need to add an email notification to your form. This is especially important if you are using the options to auto-generate the username, password and/or nickname, because it provides the users with a way to receive this information.|
Here, the most important options to select are:
Read more about how to add email notifications to user forms.
Now that you have set up both the WooCommerce product and our user registration form, you can connect them together using the Toolset Forms Commerce plugin.
Now that you have set up everything on your site, let’s check what users will see on the front-end and what occurs on your website regarding the order and user registration.
|In this section, the user can set their username, password, email address, and all the information entered in the registration form.|
3. After submitting the checkout form, the order for the purchase is automatically created by WooCommerce
In our case, users are taken to the secure PayPal page, where they can finalize the payment by providing their payment information.
This stage of the order process depends on the payment options provided by the checkout page and the final payment option that the customer chooses. In each case, they are finally navigated to the Order Received page, such as the thank-you page.
|The Order Received page summarizes the order details, a cost of the bought product, customer details, etc.|
Finally, after payment is completed, the order is marked as Complete and the user is registered on the site.
Please note that with some payment options, such as PayPal, the order will not be automatically marked as Complete after the user pays for the product. You will receive the automatic payment email notification and invoice from WooCommerce; however, you will need to manually mark the order as Complete.
There are third-party plugins that solve this issue and automatically mark the orders Complete, such as the WooCommerce – Autocomplete Order plugin.