All case studies

DEV3 Technologies · own product

DEV3 AI Membership & Paywall: one access engine for every exit, including an AI assistant that can't leak

Our own WordPress membership plugin: levels, drip, Stripe, PayPal and WooCommerce checkout, and a paywall enforced in one access engine. AI tools for tiers, teasers, churn and a member Q&A assistant that only reads what the asker may read.

Industry
Publishing & Memberships (WordPress)

Live project preview

Client systems are private — screenshots shown where permitted.

DEV3 Technologies · own product — screenshots
The paywall on a members-only article: the teaser fades into a plan picker, and the locked text never reaches the page.

The paywall on a members-only article: the teaser fades into a plan picker, and the locked text never reaches the page.

The challenge

Membership plugins usually protect the single post page and forget the other ways content leaves WordPress: the REST API, RSS feeds, excerpts, search results, menus, media files and WooCommerce products. Adding an AI assistant makes this worse, because a retrieval system that indexes members-only articles will happily quote them to a visitor. We wanted a membership plugin where every one of those exits asks the same access engine, where the AI features help a site owner earn and keep members (pricing tiers, paywall teasers, churn signals, onboarding emails), and where nothing AI-written is saved or sent without a human click. It also had to work fully with AI switched off.

Our solution

We built DEV3 AI Membership & Paywall as a WordPress plugin in PHP with a React admin, Gutenberg blocks and shortcodes for every member screen. The AI runs on the Google Gemini API with the site owner's own key.

Key design decisions

  • One access decision. Engine::check() answers "can this user read this post right now?" from the post's own setting plus every matching rule (post type, picked items, terms with their children), with drip by days or date, bypass for admins and editors, and a reason code for every answer. It is memoised per request and filterable.
  • Enforced at every exit. the_content, feeds, REST responses for every public post type, archives and search, blocks, menu items, the [dev3mb_restrict] shortcode, WooCommerce purchasability and protected file downloads all call the same engine.
  • Access filtering before the prompt. The member Q&A assistant retrieves passages by embeddings, then drops every passage from an article the asker cannot open before the prompt is built. The visitor is told how many members-only articles matched and offered the plans.
  • Explainable churn. A 0–100 score per membership from logins, reading drop-off, failed payments, cancellation and tenure, with each point named. The AI only drafts the win-back email.
  • Drafts, never auto-actions. The tier designer, smart teasers, win-back emails and onboarding sequences all return drafts the owner accepts, edits or rejects.
  • Three ways to pay. Stripe Checkout with signed webhooks (300-second tolerance, constant-time compare), PayPal Checkout and Subscriptions with verified webhooks, and the WooCommerce checkout with Subscriptions renewals synced. Keys are encrypted at rest.

Architecture

Levels, rules, memberships, payments, coupons and activity live in custom tables. An hourly job expires memberships, marks missed renewals past due, sends reminders and runs welcome sequences. Protected files move to a private folder and download through a checked link. The API client, encryption, background jobs, embeddings store and settings screens come from a shared core used across DEV3's plugins.

Results

The plugin is complete. It ships in the DEV3 AI Membership, Learning & Support Plugins Bundle on the DEV3 marketplace, alongside our AI Course Builder and AI Helpdesk plugins, and is being prepared for CodeCanyon. What was built and verified:

  • 66 PHPUnit tests, including an acceptance test of 60 role, level, drip and content access cases
  • 35 Jest tests for the admin app, front-end scripts and UI kit
  • Tests that assert locked text never appears in REST output, feeds or the outgoing AI request, while a member asking the same question does get it
  • Stripe and PayPal flows tested against mocks of their documented APIs, with signature checks; WooCommerce order grants and refunds tested for real in WooCommerce
  • All AI paths tested with mocked Google Gemini API responses; a run with a live key is the next step
  • Build, Jest, PHP_CodeSniffer at 0 errors and 0 warnings, PHPUnit in wp-env, translation template and packaging all pass

Setup guide

No licence key or activation is needed: install the zip and every feature works.

Requirements

  • WordPress 6.0 or newer and PHP 7.4 or newer
  • Optional: WooCommerce 8.0 or newer, if you want members to pay through the WooCommerce checkout (HPOS and block checkout are supported)
  • Optional: a Stripe account and/or a PayPal developer app for direct payments
  • Optional: a Google Gemini API key for the DEV3 AI features. Without one, memberships, the paywall, churn scores, template emails and keyword Q&A all still work

1. Install the plugin

  1. Download the DEV3 AI Membership, Learning & Support Plugins Bundle and unzip it. The plugin is at dev3-ai-membership-learning-support-plugins-bundle/dev3-ai-membership-paywall/dev3-ai-membership-paywall.zip.
  2. In WordPress, go to Plugins → Add New → Upload Plugin, choose that zip and click Install Now.
  3. Click Activate. The menu DEV3 AI Membership & Paywall for WordPress appears in the admin sidebar.

2. Connect Google Gemini (optional)

  1. Create an API key in Google AI Studio (sign in with a Google account, then Create API key).
  2. Go to API Config in the plugin, paste the key and click Validate. The key is stored encrypted and never sent to the browser.
  3. Optional: set a monthly budget, and switch visitor-facing AI (the Q&A assistant) off separately if you only want admin tools.

Prefer config files? Add define( 'DEV3MB_GEMINI_API_KEY', 'your-key' ); to wp-config.php instead.

3. First-time setup

  1. Go to Tools → Create missing pages. Plans, Checkout, Account, Login, Join, Member directory and Ask the library are created with their blocks.
  2. In Levels, create your levels by hand, click Start from a template, or let the DEV3 AI tier designer propose them.
  3. In Access rules, protect a category, a post type or single posts. You can also use the DEV3 AI Membership box in the post editor.
  4. In Settings → Payments, add your Stripe and/or PayPal keys and the webhook URL shown there, then click Test connection. Or turn on Offer WooCommerce checkout.
  5. Use Access rules → Test access to check what a visitor or any user sees on a post, and why.

Payment keys can also be defined in wp-config.php (for example DEV3MB_STRIPE_LIVE_SECRET and DEV3MB_STRIPE_LIVE_WEBHOOK).

Updating

Download the new bundle version, then upload the plugin zip in Plugins → Add New → Upload Plugin and choose Replace current with uploaded. Settings, members and payments are kept.

Uninstalling

Deactivate and delete the plugin from Plugins. Members keep their WordPress accounts.

How to use

Design your plans with DEV3 AI

  1. Open Levels and click Design tiers with DEV3 AI. It reads your post counts, top categories, recent titles and existing levels (never post bodies or member data).
  2. Review the 2–4 proposed levels: name, price, billing period, trial, features and the categories each one unlocks. Edit any field or untick a level.
  3. Keep Also create access rules for the suggested categories ticked and click Create levels. The levels and their access rules are made in one step. Add the Membership plans block to any page to show them.

Lock content and check it

  1. In Access rules, add a rule for a category, tag, post type or picked posts, choose the levels that get in, and optionally a drip delay (X days after joining, or a date).
  2. Choose teaser + paywall or redirect for people without access.
  3. Click Test access, pick a user (or a visitor) and a post, and read the decision and the reason.
  4. For single blocks, select the block and set Membership visibility in the sidebar. For menu items, use DEV3 AI Membership: show to in Appearance → Menus. For files, set Membership access in the media editor.

Write paywall teasers in bulk

  1. Open Smart teasers. Each locked post shows whether it uses an auto excerpt, a custom teaser or an AI draft to review.
  2. Click Write missing teasers with DEV3 AI. A background job drafts a hook headline and preview for every post without one.
  3. Review each draft and click Approve, or Edit it first. Nothing goes live until you approve it.

Win back members at risk

  1. Open Churn & win-back, or filter Members by churn risk.
  2. Open a member to see the score and the named reasons, such as a past-due payment or no visit in 30 days.
  3. Optionally type an offer code, then click Generate with DEV3 AI (or Use the template). Edit the email and send it. Bulk drafts for all high-risk members land in a review queue.

Turn on the member Q&A assistant

  1. Open Member Q&A and click Build the index with DEV3 AI. Your content is split into passages and embedded in a background job.
  2. Members ask questions on the Ask the library page (the [dev3mb_ask] shortcode). Answers cite only articles the asker can read; visitors are told how many members-only articles may cover their question.
  3. Check the unanswered questions list for content ideas.

Related case studies