PBJ.TECH — WordPress Plugins

PBJ Access Control — User Guide

Version 2.4.0 · pbj.tech/wordpress-plugins

PBJ Access Control — Install and Usage Guide

What this plugin does

Locks individual Pages behind login, optionally gates the whole WooCommerce area for logged-out visitors, shows a customizable restricted-content message, and holds new user registrations as pending until an admin approves them (with each signup's IP and detected location shown for review).

Requirements

Installation

  1. Plugins → Add New → Upload Plugin → pbj-access-control.zip → Install Now (choose "Replace current with uploaded" when upgrading).
  2. Activate "PBJ Access Control".
  3. Settings carry over on upgrades; a schema migration runs automatically.

First-time setup

Open Settings → Access Control. Since 2.4.0 the page opens with a Setup checklist card — live status rows (green tick / red triangle) for restricted-page count, WooCommerce blocking, registration approval (with the number of users waiting), and the restricted message, each with a plain-English explanation and a button linking to where you fix it — followed by a numbered "How to use this plugin" walkthrough. Below the card, the settings:

  1. Block WooCommerce to logged-out users — gates shop/cart/checkout/account behind login.
  2. Allow access to WooCommerce registration page — keeps the My Account registration form reachable while everything else is blocked (also requires WooCommerce → Settings → Accounts "Allow customers to create an account" to be on).
  3. Require admin approval for new registrations — new users can't log in until approved on Users → PBJ User Approvals.
  4. Approval notification emails — comma-separated recipients; empty = site admin email.
  5. Sign-up / Login Message — the WYSIWYG editor at the bottom of the page controls what blocked visitors see. "Reset message to default" restores the stock Members Only box.

To restrict a page: edit the Page and tick Access Restriction → Restrict this page to logged-in users only in the sidebar.

Daily usage

Testing as a logged-out visitor

Use a private/incognito window (or a second browser). Check: a restricted page shows the message with HTTP 403; the Woo pages redirect/block per your settings; searching for the restricted page's title returns nothing; https://yoursite.com/wp-json/wp/v2/pages/<id> shows "rendered":"" for content.

Upgrading

Upload the new zip and choose "Replace current with uploaded". Settings, per-page toggles, and pending users survive (deactivation never deletes settings; only deleting the plugin runs the uninstall cleanup).

Troubleshooting

Where things live