This addon can be used to accept membership payment via the WooCommerce plugin.
This is useful when you want the WooCommerce plugin to handle the transaction processing. So you create a product in WooCommerce then sell it (the same way you sell any WooCommerce product). Our plugin will receive a notification (from WooCommerce) after the transaction and then it will handle the membership account creation and permission setup side of things.
Installing the Addon
- Click on the Add New menu under the plugins interface.
- Click on the the Upload Plugin button to go to the upload tab.
- Upload the swpm-woocommerce-addon.zip file.
- Hit the Install Now button and then activate the addon.
Using the WooCommerce Integration Addon
When this addon is installed, you will see a new section called “Payment for Simple Membersip” in your WooCommerce product configuration interface.
Create a new WooCommerce product (the same way you create any product in WooCommerce) and specify the membership level ID in the “Payment for Simple Membership” meta box. See screenshot below:
When you specify a membership level in your WooCommerce product, the plugin will know that it’s a payment for a membership.
When a customer purchase the product in question, a membership account (for the specified level) will be created for the user. If the user already has an existing account, then the account will be upgraded to the paid level.
How the Member Registration is Handled
There are two different ways you can handle the membership registration with WooCommerce. Read both the options below then use the one that works best for your setup.
Option 1) Allow WooCommerce to Create the User Account
If you allow your customers to create account on your site when they checkout via WooCommerce then you should use this option.
In this setup, when WooCommerce creates a user account, a basic membership account (a free account) is also created in simple membership. As soon as the payment is confirmed, the member’s account is updated to the paid level (to reflect the payment).
The following steps outline a typical flow of how this option works:
- A visitor buys a WooCommerce product for a membership level from your store.
- WooCommerce will create a WP User account for this user (just like it does for any product checkout). A member account for a free level will get created in simple membership for this user.
- After the payment is confirmed, WooCommerce will notify the membership plugin.
- Simple Membership plugin will then upgrade that account to the appropriate membership level (to the level specified in the product).
- The member can then log into the site via simple membership’s login widget and access the content.
Do the following to setup this option:
Go to the “woocommerce” menu link from the Simple Membership plugin’s admin menu.
Enable the Auto create member account option. Select a free membership level from the dropdown (create a new membership level if you don’t have one for this purpose). This level doesn’t give the user access to any content (it is just used to create a basic account). Save the settings.
Option 2) Allow Anonymous Checkout in WooCommerce
If you allow your customers on the site to checkout via WooCommerce anonymously then this setup will be useful for you.
In this setup WooCommerce is used just for the checkout (transaction processing). The user account creation process will be entirely handled by Simple Membership plugin.
The following steps outline a typical flow of how this option works:
- A visitor buys a WooCommerce product for a membership level from your store.
- After the payment is received, WooCommerce will notify the membership plugin.
- The plugin knows what membership level this user paid for (from the product configuration), the plugin will create the appropriate membership account for this user.
- The member will receive an email that contains a special link to complete the paid registration.
- When the member clicks on that special link (from the email), it will let him complete the registration for the level he paid for.
- The member can then log into the site via simple membership’s login widget and access the content.
You will likely have all the account registration option turned off in the “Accounts” tab of WooCommerce settings for anonymous checkout
WooCommerce Order Status
This addon will only process payments where the WooCommerce order status is set to processing or completed. This ensures that the money has been received before the member gets access to paid content.
If a order status is set to pending in WooCommerce then our plugin won’t process that payment just yet (since pending means the payment hasn’t cleared). It will wait for that order status to be changed to processing or completed.
If your WooCommerce plugin is setup correctly, then the order status will be set to processing or completed automatically after an online payment is received. So it should work in an automated fashion.
However, if you are accepting manual payment then you need to review your order manually and set the order status correctly after you receive money from the customer. You can also use an WooCommerce extension to set the order status to complete automatically (after you receive an order).