WP Manifestindependent plugin directory
manifest / ecommerce / woo-membership-cart-swap

Shuzia Join Membership (Cart Swap)

Adds a /join endpoint that temporarily swaps the cart to a selected membership product, redirects to checkout, then restores the previous cart after successful purchase.

by George Nnanwubar (Manndi Technologies Limited) · github.com/georgennanwubar/woo-membership-cart-swap · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/georgennanwubar/woo-membership-cart-swap/archive/refs/heads/main.zip

WooCommerce Membership Cart-Swap (Shuzia Join Membership)

A WooCommerce plugin that adds a single /join endpoint which temporarily swaps the shopper's cart to a configured membership product, sends them straight to checkout, and restores their previous cart after a successful purchase.

Version: 1.0.7 · Stack: PHP, WordPress, WooCommerce · License: GPL-2.0-or-later

What it does

Gives a site a clean "join membership" funnel without disrupting an in-progress shopping cart. Hitting the configurable join URL stashes the current cart, replaces it with the membership product only, and routes to checkout; once payment completes, the original cart contents are returned to the shopper.

Key technical details

  • Registers a configurable rewrite endpoint (default /join) and swaps the cart on template_redirect.
  • Persists the pre-swap cart in the WooCommerce session and restores it post-purchase.
  • Membership product ID and endpoint slug are admin-configurable options (OPTION_PRODUCT_ID, OPTION_JOIN_SLUG) — nothing client-specific is hardcoded.
  • Declares WooCommerce HPOS and Cart/Checkout Blocks compatibility to avoid admin warnings.
  • Clean separation into admin, cart-swap, and compatibility classes.

Installation

  1. Requires WordPress + WooCommerce (WC 7.0+).
  2. Copy to wp-content/plugins/woo-membership-cart-swap/ and activate.
  3. Configure the membership product and join slug under the plugin's settings, then flush permalinks (Settings → Permalinks → Save).

Built by

George Nnanwubar — george.ng · github.com/georgennanwubar · Manndi Technologies