WP Manifestindependent plugin directory
manifest / ecommerce / woocommerce-gated-code-item-checkout

WooCommerce Checkout Access Codes

Allows admins to assign codes to a product and only allow purchases is code is entered on checkout

★ 0stars
WooCommercelatest · 9mo ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/dannyportal/woocommerce-gated-code-item-checkout/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A lightweight WooCommerce plugin that adds a single Access Code field to checkout when needed, and prevents customers from purchasing certain products unless a valid code is provided.

Built to be generic and reusable across any store/industry.

What it does

  • Adds an Access Code field to checkout only if the cart contains restricted products.
  • Lets store owners assign one or multiple allowed codes per product (one per line).
  • Blocks checkout (order placement) unless the code matches every restricted product in the cart.
  • Saves the used access code onto the order for admin visibility.

Requirements

  • WordPress + WooCommerce installed and active.

Installation

  1. Create a folder: wp-content/plugins/woocommerce-checkout-access-codes/
  2. Add this file inside it: woocommerce-checkout-access-codes.php
  3. Activate in WP Admin → Plugins.

Setup (Store Owner)

  1. Edit any product in WooCommerce.
  2. Go to Product Data → General.
  3. Find Checkout Access Codes.
  4. Enter one code per line. (Leave blank for unrestricted products.)
  5. Update the product.

How matching works

  • Codes are normalized before comparison:
    • trimmed
    • multiple spaces collapsed
    • converted to uppercase

Admin: where to see the code used

Open the order in WP Admin and you’ll see Access Code Used in the order details.

Notes / limitations

  • This plugin blocks purchase at checkout (not at add-to-cart).
  • A single code must be valid for all restricted products in the cart.

License

MIT (recommended) — add a LICENSE file if you want open-source friendly defaults.

Releases

1 release.

Tag
Published
WooCommerce latest
Jan 12, 2026 9mo ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.