=== MemberArea Connector ===
Contributors: chrvolquardsen
Tags: membership, courses, paywall, checkout, members
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.1.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sell and protect content with your MemberArea: checkout and product blocks, member sign-in, and pages locked to courses, groups or products.

== Description ==

MemberArea Connector is the official plugin for MemberArea (memberarea.io), operated by Calendory Ltd. It links a WordPress site to your MemberArea, the platform where your memberships, courses and products live. Your WordPress site becomes the public face; the MemberArea stays the system of record for members, access and payments.

**Sell from any page**

* **Checkout Button**: a button that opens the MemberArea checkout for one of your products.
* **Product**: a product card with price and buy button.
* **Cart**: a shopping cart for several products at once.
* **Course Catalogue**: your published courses with covers, prices and buy links.
* **Verified Badge**: an embedded, verifiable badge for one of your courses.
* **Form**: one of your MemberArea forms. Every submission is stored in your MemberArea.

**Let members sign in**

* **Member Login**: a sign-in button that becomes name, picture and a sign-out link once a member is signed in.
* Members sign in with their MemberArea account. They are sent to your MemberArea, approve the connection once, and come back signed in. Their password never reaches WordPress, and no WordPress user account is created for them.

**Lock content to memberships**

* Lock any page or post to signed-in members, to visitors who are not signed in, or to one of your courses, groups or products. Visitors without access see a short notice, are sent to sign in, or are redirected to a page you choose.
* Lock single blocks the same way, right in the editor: any block can be shown only to members, only to guests, or only to holders of a course, group or product.
* **My Courses** and **Course Progress** blocks show signed-in members their own courses and how far they are.

**Built for real sites**

* Works with page caches: pages stay cacheable for anonymous visitors, and personalised responses are marked not to be cached.
* Every block has a matching shortcode, from [memberarea_checkout] to [memberarea_course_catalogue], so the classic editor can place them too.
* Supports the WordPress privacy tools: a personal data exporter, a personal data eraser and suggested wording for your privacy policy page.
* Ships in English and German, with every string translatable.

MemberArea Connector requires a MemberArea account on a plan that includes API access, currently Professional or higher. MemberArea is a paid membership platform by Calendory Ltd; this plugin is free.

== External services ==

This plugin talks to one service: the MemberArea you enter on its settings page, for example yourname.memberarea.io. Nothing is sent anywhere until you save a domain there.

What your server sends:

* Calls to the MemberArea API to fetch products, prices, courses, groups, badges and forms, to verify your API key, and, for signed-in members, to ask which content they may see. The API key is only ever sent from your server to your MemberArea. These requests carry your site address, so the MemberArea can tell connected sites apart.

What a visitor's browser loads:

* Pages carrying the product, cart, checkout or course catalogue blocks load a script from your MemberArea; badge pages load a badge script and an embedded badge page. On those pages the visitor's IP address and browser details reach your MemberArea the same way they reach any embedded service, whether or not the visitor is signed in.
* Blocks that show pictures, that is the course catalogue, My Courses and the Member Login block, output image addresses exactly as the MemberArea returns them. Uploaded images are served from the MemberArea's own image service; if you entered an image address hosted somewhere else, the visitor's browser loads it from there.
* Opening the checkout shows a MemberArea checkout page in an overlay on your site. That page is served by the MemberArea and may load its own fonts, scripts and images from the addresses it uses.

What a visitor sends:

* The form block sends what a visitor types in it to your MemberArea, where the submission is stored.
* Signing in sends the member to your MemberArea and back; while they are signed in, their membership identifier is used to check access, and their name and profile picture are fetched for the login block. Their email address is shared with WordPress only if you tick that option when connecting the site.

The MemberArea platform is operated by Calendory Ltd. Terms of service: https://memberarea.io/legal/terms-of-service. Privacy policy: https://memberarea.io/legal/privacy-policy. Imprint: https://memberarea.io/legal/imprint. The MemberArea you connect to belongs to whoever runs it, and may publish its own terms and privacy policy under /legal/terms and /legal/privacy on its domain.

== Installation ==

1. Install and activate the plugin through the Plugins screen in WordPress.
2. In your MemberArea, go to Settings, then API, and create a key. Under WordPress, tick "View"; add "Manage" if members should be able to sign in on your site.
3. In WordPress, go to Settings, then MemberArea. Enter your MemberArea domain and the key, and save.
4. Use "Check connection" on the same screen. It tells you whether the key works and which business answered.
5. For member sign-in, press "Set up member login" further down the same screen. This is a separate step: the API key alone does not enable it. Your site has to run on https and use any permalink structure other than "Plain", and the plugin says so if it does not.
6. Add your first block: the editor lists all of them under the MemberArea category.

== Frequently Asked Questions ==

= Do I need a MemberArea account? =

Yes, on a plan that includes API access, currently Professional or higher, because the plugin works through an API key. The plugin is a connector: products, courses, members and payments all live in your MemberArea. The plugin itself is free.

= Where is my API key stored? =

On your WordPress server, in the options table. It is sent only from your server to your MemberArea and never reaches a visitor's browser. The settings screen shows at most its last four characters.

= Do my members get WordPress user accounts? =

No. Members sign in against your MemberArea and get a session cookie on your site. No WordPress user is created, and your WordPress user list stays untouched.

= Does it work with caching plugins? =

Yes. For anonymous visitors, pages stay cacheable and carry a header telling shared caches to keep member and guest copies apart. As soon as a visitor is signed in, responses are marked not to be cached, including for the common cache plugins that honour DONOTCACHEPAGE.

= Can I use it without the block editor? =

Yes, for placing blocks: every block has a shortcode twin, namely [memberarea_checkout], [memberarea_product], [memberarea_cart], [memberarea_form], [memberarea_badge], [memberarea_login], [memberarea_my_courses], [memberarea_progress] and [memberarea_course_catalogue]. Locks are different: an existing lock keeps working whatever the editor, but setting one up needs the block editor, because the panel that holds it lives there.

= Does it work on a multisite network? =

Yes. Each site in the network connects to a MemberArea on its own, with its own key, and its stored data is removed site by site when the plugin is uninstalled. One caveat: uninstalling revokes the connection in the MemberArea only for the site it runs on. On the others, switch member login off before you uninstall, or remove the connection in the MemberArea afterwards.

= What about the GDPR? =

The plugin registers with the WordPress privacy tools: the personal data exporter lists everything the site holds about a signed-in member, the eraser removes it, and suggested wording for your privacy policy appears under Settings, then Privacy. What the site holds is deliberately small: a session, a name, a picture address and short-lived cached answers. If you connect without sharing email addresses, members cannot be looked up by email here, and the export screen says so.

= What happens when I delete the plugin? =

Uninstalling removes everything the plugin stored: settings, member sessions, cached answers and its connection, which is also revoked in your MemberArea (on a network, see the multisite answer above). Two things remain by design. Access rules on pages are kept, so if you reinstall, protected pages come back protected instead of standing open. And shortcodes remain in your posts as plain bracket text, as with every WordPress plugin; remove them from the post content if you are leaving for good.

== Screenshots ==

1. The settings screen: domain, API key and the result of a connection check.
2. All nine blocks in the inserter, with a course catalogue on the page behind it.
3. Locking a page in the editor: members only, or holders of one course, group or product.
4. What a visitor without access sees: a short notice with a sign-in button.
5. The course catalogue block on a public page, with covers and prices.
6. A signed-in member's view: login block, their courses and their progress.

== Changelog ==

= 0.1.1 =
* Translations now come from translate.wordpress.org instead of being bundled.

= 0.1.0 =
* First release: nine blocks with shortcode twins, member sign-in against your MemberArea, page and block locks for courses, groups and products, privacy exporter and eraser.

== Upgrade Notice ==

= 0.1.1 =
Translations move to translate.wordpress.org.

= 0.1.0 =
First release.
