Custom WooCommerce Subscription One-Time Product Addition Plugin

Challenge

A wellness company needed a way for subscription customers to add products to their next delivery only without committing to recurring purchases.

The existing WooCommerce Subscriptions framework only allowed adding products as permanent recurring items, preventing customers from testing new products or making one-time additions to their upcoming shipment.

Solution

We developed a custom WooCommerce extension that enables customers to add products to their subscription as one-time purchases that automatically remove themselves after the next shipment.

The system distinguishes between recurring subscription items and next-shipment-only additions, providing customers with flexibility while maintaining the integrity of their subscription.

Technical Implementation

  • AJAX-powered subscription management: Real-time product additions to active subscriptions without page reloads, using custom WordPress REST API endpoints.
  • Metadata tracking system: Custom order item metadata flags products as next-shipment-only, allowing the system to differentiate between recurring and one-time items.
  • Automatic cleanup mechanism: When a renewal order is created, the system automatically removes all next-shipment-only items from the subscription and logs the action in order notes.
  • Dynamic pricing logic: One-time additions use standard pricing while recurring items receive subscription discounts, ensuring proper revenue tracking.
  • Subscription validation: Prevents customers from removing all recurring items, ensuring subscriptions always maintain at least one recurring product.
  • Integration with reporting systems: Tracks one-time purchase revenue separately from recurring subscription revenue for accurate business analytics.
  • Special coupon support: Custom coupon restrictions allow targeted promotions for next-shipment-only items.

Results

Customers can now easily test new products or add special occasion items to their next delivery without altering their ongoing subscription preferences.

The automated removal system ensures accurate recurring revenue tracking while providing customers with the flexibility to enhance individual shipments.