Leaky Paywall - MagHub integration
After installing the Leaky Paywall - MagHub add-on, go to Leaky Paywall > Settings > MagHub to start the setup.
From your MagHub account, you will need your Private Key, Public Key, and MagHub subdomain.
You will also need to create a page to send users to if an active subscription cannot be found with their email address when they try to log on to your site. We recommend adding some type of call to action on that page to get them to subscribe.
For registration, we assume you are using the MagHub registration iframe. You can either embed the iframe code directly on the page, or use the provided shortcode below.
[lp_maghub_registration iframe_url="https://subdomain.maghub.com/webform/?form=subscription_by_pub&id=X&pub_id=X"] shortcode to any page. Replace the iframe_url value with the correct url for your registration form.
Mapping Leaky Paywall Levels to MagHub Subscriptions
Go to Leaky Paywall > Settings > Subscriptions and scroll down to Subscription Levels. Using the MagHub Plans setting on each level, map it to the corresponding plan inside of your MagHub account.
Subscriber Login Flow
When a user logs into your site, Leaky Paywall will make a call to the MagHub API and make sure that subscriber has an active subscription in MagHub. If they do, they will be allowed to log in as normal. If they do not, they will be redirected to the page set in the "Inactive Subscription Redirect" setting.
If the user has an active subscription in MagHub and they don't exist in the WordPress database yet, their user will be created during the login process. We recommend using wording like this above your login form.
"If this is your first time logging in and you have an active subscription, simply enter your subscription email and the password you would like to use on the site."
You will be able to see their subscriber info under Leaky Paywall > Subscribers. Their "Subscriber ID" will correspond to their actual MagHub subscriber ID.
Account Lookup Workflow
If you want users to be able to setup their account with their subscriber number and zip code, you can do that with the [leaky_paywall_maghub_account_lookup] shortcode.
Add it to a page and the user can enter their MagHub subscription number and zip code. If a match is found, then the user is prompted to enter their email address and password to set up their online account.