=== Chili Paywall – Content for members only ===
Contributors: chilicooperation
Tags: paywall, membership, members, restrict content, access code
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Simple paywall: show posts, pages, categories or sections to members only. With preview text, login box and access codes.

== Description ==

With **Chili Paywall** you show selected content only to your members. You tick a box on a post or a category. Visitors without access see a preview text and a notice box with a login form. The admin interface is currently in German.

For visitors without access, the protected content is not output by the server. It is not merely hidden. This applies to feeds, the REST API and excerpts as well.

**Features (all free, no limits)**

* "Nur für Mitglieder" (members only) switch per post and page (classic editor and block editor)
* The same switch per category
* Preview text with adjustable length, or up to the "read more" tag
* Notice box with login form, texts and color freely adjustable
* Shortcode `[chili_paywall]…[/chili_paywall]` for sections of a page (also works in the shortcode widget of Elementor; this plugin is an independent add-on, not affiliated with Elementor)
* Members are WordPress users with their own role "Mitglied (Paywall)". Administrators and editors always see everything.
* Add and remove members in the admin area, with an optional expiry date
* Access codes: anyone who redeems a code becomes a member
* Compatible with page caching: protected pages send `DONOTCACHEPAGE` and suitable cache headers
* Structured data for paid content (`isAccessibleForFree`)

**No payment provider in this version**

The plugin does not process payments. You sell access your own way (invoice, shop, print subscription) and unlock customers with access codes or by hand. Online payment is not included.

**Security and privacy**

* The plugin sends no data to external servers and embeds no third-party services.
* It sets no cookies of its own. When someone logs in, WordPress sets its usual login cookies.
* Forms are protected with a nonce, hidden field, time check and rate limit. IP addresses are not stored in plain text.

**Optional Pro add-on (separate, for businesses only)**

A separate add-on offers a metered paywall (free articles per month), several tiers, access codes with a duration and batch creation, company access, passwordless login, a reminder email before expiry, statistics and share links. It is obtained separately from chili-cooperation.com and sold to businesses only. This plugin does not lock anything, and all features described here stay free permanently. More information: https://chili-cooperation.com/wp-apps/#paywall

**Important notes**

This plugin is a technical tool and not legal, tax or data protection advice. If you sell access, obligations regarding price information, right of withdrawal, cancellation options (cancellation button) and data protection may apply. The site operator is responsible for these. The plugin does not generate legal texts. Use is at your own risk, and the plugin is provided without warranty.

Not protected are the title, featured image, excerpts entered by hand, comments and files in the media library. Themes or plugins that read content directly from the database, bypassing WordPress, cannot be intercepted by this plugin. After setup, please check your website in a private browser window.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` or search for it under "Plugins > Add New".
2. Activate the plugin.
3. Edit a post and tick "Nur für Mitglieder" in the "Chili Paywall" box.
4. Under "Chili Paywall > Mitglieder" add a member, or create a code under "Chili Paywall > Zugangscodes".

== Frequently Asked Questions ==

= Can someone find the protected text in the page source? =
No. Visitors without access receive only the preview text and the notice box from the server.

= How do I sell access? =
In this version, your own way, for example by invoice. Then you give the customer an access code or add them as a member.

= Do I see the paywall as an administrator? =
No. Administrators, editors and the author of a post always see the full content. Check the paywall in a private browser window.

= Does it work with a caching plugin? =
Protected pages are excluded from page caching. Also make sure that logged-in users do not receive cached pages. This is the default in most caching plugins.

= Does the plugin set cookies or connect to external servers? =
The plugin sets no cookies of its own and does not connect to external servers. When someone logs in, WordPress sets its usual login cookies.

= What happens to the data when I delete the plugin? =
Nothing, unless you explicitly choose "Alle Daten dieses Plugins entfernen" in the settings. User accounts always remain.

== Changelog ==

= 0.1.0 =
* Initial release.

== Screenshots ==

1. Page with a protected section (administrators see it in full)
2. Members with status and access end date
3. Access codes
4. Protected content: categories, posts and pages
5. Preview and notice box settings
