setting up the woocommerce integration v2 - superdav42/wp-multisite-waas GitHub Wiki
Setting Up The WooCommerce Integration (v2)
IMPORTANT NOTE: This article refers to WP Multisite WaaS version 2.x.
ATTENTION: WP Multisite WaaS: WooCommerce Integration requires WooCommerce to be activated at least on your main site.
We understand that Stripe and PayPal are not available in some countries which limit or hinders WP Multisite WaaS users from effectively using our plugin. So we created an add-on to integrate WooCommerce.
WooCommerce is a very popular eCommerce plugin. Developers around the world created add-ons to integrate different payment gateways to it. We took advantage of this to extend the payments gateways you can use in the WP Multisite WaaS billing system.
Setting It Up
First, you need to install the WooCommerce Integration add-on which is free for licensed users. To install it, click on WP Multisite WaaS on your super admin dashboard and select Add-ons.
Here you can find all WP Multisite WaaS add-ons. Click on the WP Multisite WaaS: WooCommerce Integration add-on.
A window will pop up with the add-on details. Just click on Install Now .
After the installation is done, you will be redirected to the plugins page. Here, just click on Network Activate and the WooCommerce add-on will be activated on your network.
After activating it, if you still don't have the WooCommerce plugin installed and activated on your website, you will receive a reminder.
Once installed, you will see an additional option under the WP Multisite WaaS payments settings. You can then enable the WooCommerce option from there.
You can configure some basic settings like the display name that will show in the front end and instructions to guide your users in their checkout flow. Then you can go to your Main site’s WooCommerce settings to enable and configure the payment gateway you prefer to use.
How to manage the payment
The WooCommerce Integration works in a very similar way to the way our Manual Gateway works. The downside is that every payment must be paid manually at the end of the billing period. Here is how the flow works:
-
Once the user’s billing cycle ends, the membership is put on hold. At the same time, an order will be created on the WooCommerce install on your network’s main site.
-
Users then receive an invoice in their email, with a link to perform the payment (the link also appears on their billing history from their subsite dashboard). That link redirects the user to the WooCommerce checkout , where users will be able to select one of the available WooCommerce gateways in order to process their payment.
-
Once the payment is received, the membership is renewed , the payment is logged on WP Multisite WaaS and the order is set to complete.
Some Important Notes:
-
The default functionality of WP Multisite WaaS still works with this integration form. For example, issuing refunds from the Subscription Management screen will communicate with WooCommerce to issue the refund using the selected payment form.
-
WP Multisite WaaS: WooCommerce Integration relies on WP-Cron to work. This works very well most times, but if the site has low traffic then the cron is not prompted to check for scheduled events and the event is missed, which can cause execution delays.
Woocommerce Subscriptions Plugin
Manually initiating a payment each month is not ideal for end-users to do as a subscription is expected to automatically recur every billing cycle. So we designed the WooCommerce Integration addon to support the WooCommerce Subscriptions plugin. This will automate the payment to make the transaction easier for your end-users.
All you need to do is install the Woocommerce Subscriptions plugin and have it activated on your main site. Then go back to WP Multisite WaaS payments settings and enable the integration.
And that is it. Your end-users will no longer need to manually make a payment at the end of their billing cycle.
Aside from an order being created on your main site under Woocommerce , it will also create a subscription for each account.