WP Manifestindependent plugin directory
manifest / ecommerce / ox-offer-subscription

OX Offer Subscription

Wordpress plugin to handle wine club offers

by Andy McLeod · github.com/macdudeuk2/ox-offer-subscription · 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/macdudeuk2/ox-offer-subscription/archive/refs/heads/master.zip

OX Offer Subscription v1.1.7

A WordPress plugin that provides a custom Gutenberg block for creating product offer subscription forms with quantity selection, comprehensive submission management, and advanced allocation features.

Features

  • Product Offer Block: Custom Gutenberg block with image, title, description, pricing, and quantity inputs
  • Three-Quantity System: Min Required, Desired, and Max Required quantities with smart validation
  • Dynamic Form Wrapping: Automatically wraps all Product Offer blocks on a page in a single form
  • User Authentication: Requires logged-in users and auto-populates user information
  • REST API Integration: Secure form submission via WordPress REST API
  • Email Notifications: Configurable HTML email templates for admin and user notifications
  • Admin Interface: Complete admin panel for managing submissions and settings
  • Custom Post Types: Stores submissions as a custom post type (ox_offer_submission) with full admin interface
  • Product Allocation System: Track allocated quantities for each product in submissions
  • User Frontend Shortcode: [ox_offer_submissions] for users to view their submission history
  • Offer Reports: Comprehensive reporting system with admin page and shortcode
  • Enhanced Admin Reports: Interactive dropdown allocations with live total updates
  • Offer Finalisation System: Lock offers to prevent further submissions and changes
  • Frontend Finalisation Checks: Automatic detection and blocking of finalised offers
  • Improved Quantity Validation: Enhanced min ≤ ideal ≤ max logic with better user experience
  • Existing Submission Replacement: Automatically replaces previous submissions with new ones
  • Kadence Theme Integration: Seamless integration with Kadence theme colors and styling
  • Page Title Tracking: Automatically records the page where offers are submitted
  • Wine Offers Post Type: Dedicated post type (wine_offer) for specialized wine offer management
  • Migration System: Built-in migration tools for legacy "Wine Offer" category posts
  • Clickable Image Popup: Full-size image viewing with modal popup functionality
  • Sticky Header Compatibility: Enhanced popup positioning for sites with fixed navigation
  • OX Content Blocker Integration: Wine offers integrated with content blocking system

Installation

  1. Upload the ox-offer-subscription-1.1.7.zip file to your WordPress site via Plugins > Add New > Upload Plugin
  2. Activate the plugin through the Plugins menu in WordPress
  3. Configure the plugin settings at Settings > OX Offer Subscription

Upgrade from v0.4.x to v1.0.0

Automatic Upgrade:

  • The plugin will automatically run upgrade routines when activated
  • No manual database changes required
  • All existing data is preserved and compatible

New Features Available:

  • Enhanced admin reports with interactive allocations
  • Offer finalisation system
  • Improved quantity validation
  • Existing submission replacement
  • Frontend finalisation checks

Backward Compatibility:

  • All existing submissions remain accessible
  • Existing email templates and settings are preserved
  • No breaking changes to existing functionality

Upgrade from v1.0.0 to v1.0.1

Production Release:

  • Removed all debug logging for production use
  • No functional changes or database modifications
  • Improved performance by eliminating debug output
  • All existing functionality remains unchanged

What Changed:

  • Commented out all error_log() statements in PHP files
  • Commented out all console.log() statements in JavaScript files
  • Maintained debug code for future troubleshooting (commented out)
  • Clean production-ready release

Upgrade from v1.0.1 to v1.0.2

Production Compatibility Fix:

  • Fixed post lookup for price extraction and finalisation
  • Resolved "Offer Page Not Found" errors in production
  • Improved compatibility with post-based offer pages
  • No functional changes or database modifications

What Changed:

  • Replaced get_page_by_title() with custom get_post_by_title() method
  • Updated price lookup to work with posts instead of pages only
  • Fixed finalisation system to work with post-based offers
  • Enhanced production system compatibility

Upgrade from v1.0.2 to v1.0.3

Reset Allocations Feature:

  • Added "Reset Allocations" button to admin reports page
  • Allows admins to reset all allocations back to null
  • Changes submission statuses back to "Pending"
  • Admin-only feature with proper security checks
  • No database schema changes required

What Changed:

  • New AJAX handler for reset allocations functionality
  • Added reset button to admin reports interface
  • Implemented secure reset logic with nonce verification
  • Enhanced admin workflow for allocation management

Upgrade from v1.0.3 to v1.0.4

Production Stability Fix:

  • Added comprehensive error handling to prevent fatal errors
  • Enhanced upgrade process with try-catch blocks
  • Improved plugin initialization error handling
  • Better production environment compatibility
  • No functional changes or database modifications

What Changed:

  • Added error handling to upgrade check function
  • Added error handling to plugin initialization
  • Enhanced production stability and error logging
  • Fixed potential fatal error issues in production

Upgrade from v1.0.5 to v1.1.0

Wine Offers Post Type and Migration System:

  • Added dedicated wine_offer post type for specialized wine offer management
  • Implemented comprehensive migration system for legacy "Wine Offer" category posts
  • Added admin interface for wine offers with dedicated management tools
  • Integrated wine offers with OX Content Blocker system
  • Enhanced admin menu with Wine Offers and Migration submenus
  • Added migration tools with progress tracking and error handling

What Changed:

  • New wine_offer post type with full WordPress REST API support
  • Migration system to convert category-based posts to custom post type
  • Admin interface for managing wine offers separately from general submissions
  • Integration with content blocking system for access control
  • Comprehensive error handling and progress tracking for migrations
  • Modular migration system with data integrity checks

Upgrade from v1.0.4 to v1.0.5

Clickable Image Popup and System Cleanup:

  • Added clickable images with popup functionality for full-size image viewing
  • Implemented popup modal with close button and background click to close
  • Added smooth animations and responsive design for popup
  • Cleaned up upgrade system by removing all pre-1.0.0 upgrade code
  • Simplified upgrader to only handle 1.0.0+ versions
  • Enhanced image display to use WordPress 150x150 thumbnails
  • Improved plugin maintainability and performance

What Changed:

  • Added clickable image functionality with hover effects
  • Implemented popup modal with full-size image display
  • Added close button (×) and background click to close
  • Included smooth animations and keyboard accessibility
  • Removed ~300 lines of legacy upgrade code
  • Simplified upgrade system for better maintainability
  • Modified image display to use WordPress thumbnails
  • Enhanced user experience with interactive image viewing

Upgrade from v1.1.4 to v1.1.5

Wine Offer Post Type Lookup Fix:

  • Fixed critical issue with wine offer post type lookup in production environments
  • Resolved "Offer page not found" errors during finalisation process
  • Fixed missing sale prices in admin report tables
  • Improved compatibility with wine offer custom post type structure
  • Enhanced production system reliability and error handling

What Changed:

  • Updated get_post_by_title() method to search for wine_offer post type instead of post type
  • Fixed finalisation process to correctly find and update wine offers
  • Resolved price extraction from Product Offer blocks in wine offer content
  • Improved admin report functionality with proper price display
  • Enhanced production compatibility and error resolution

Bug Fixes:

  • Fixed finalisation error: "error finalising offer: offer page not found"
  • Fixed missing sale prices in admin report summary tables
  • Resolved wine offer lookup issues across all admin functions
  • Improved error handling for wine offer post type operations

Usage

Adding Product Offer Blocks

  1. Edit any page or post
  2. Add the "Product Offer" block from the Gutenberg block library
  3. Configure the block with:
    • Product image
    • Title and description
    • List price and sale price
    • Three quantity fields: Min Required, Desired, and Max Required (defaults to 0)

Quantity System

The plugin now features a three-quantity system:

  • Min Required: Minimum quantity the user wants
  • Desired: Ideal quantity the user prefers (highlighted field)
  • Max Required: Maximum quantity the user is willing to accept

Smart Validation: The system enforces Min ≤ Desired ≤ Max logic with real-time validation and auto-adjustments.

Multiple Blocks

  • Add multiple Product Offer blocks to the same page
  • All blocks will be automatically wrapped in a single form
  • Users can specify quantities for each product
  • Form submits all products together

User Requirements

  • Users must be logged in to submit offers
  • User information (name, email, phone) is automatically populated from their WordPress profile
  • First and last names are retrieved from usermeta fields

User Submission History

Use the shortcode [ox_offer_submissions] on any page to display users' submission history:

  • Shows all submissions for the logged-in user
  • Displays offer details, status, and date
  • Expandable product details with quantities and allocations
  • Clean, responsive design with Kadence theme integration

Enhanced Admin Reports (v1.0.0)

The admin reports now include advanced allocation features:

Interactive Allocations:

  • Dropdown Selections: When users have different min/max values, admins can select from a range
  • Live Total Updates: Row and column totals update automatically as allocations are changed
  • Visual Indicators:
    • ★ Star indicates the original desired quantity
    • ✓ Tick shows the currently allocated quantity
  • Multiple Submission Tracking: Asterisk (*) indicates users with multiple submissions

Allocation Management:

  • Commit Allocations: Save allocation changes and mark submissions as "Reviewed"
  • Finalise Offers: Lock the offer group and mark all submissions as "Ordered"
  • Unfinalise Offers: Admin-only ability to unlock finalised offers for changes

Offer Finalisation System (v1.0.0)

Admin Controls:

  • Finalise Button: Locks the offer group and prevents further changes
  • Unfinalise Button: Admin-only ability to unlock finalised offers
  • Status Tracking: Automatically updates submission statuses to "Ordered"

Frontend Protection:

  • Automatic Detection: Checks if offer is finalised when page loads
  • Warning Display: Shows clear message that submissions are closed
  • Submit Button Hidden: Prevents any submission attempts
  • Priority Override: Finalisation check takes priority over existing submission warnings

Improved Quantity Validation (v1.0.0)

Enhanced Logic:

  • Ideal Value Protection: Ideal quantity is never automatically changed by the system
  • Smart Constraints:
    • If ideal increases above max → max increases to match
    • If ideal decreases below min → min decreases to match
    • If max decreases below ideal → max is reset to ideal (prevents further decrease)
    • If min increases above ideal → min is reset to ideal (prevents further increase)
  • Real-time Validation: Runs on every input change to maintain constraints

Existing Submission Replacement (v1.0.0)

Automatic Replacement:

  • Previous Submission Detection: Warns users about existing submissions
  • Automatic Deletion: Removes old submission when new one is submitted
  • One Submission Per User: Ensures only one active submission per user per offer

Offer Reports

The plugin includes a comprehensive reporting system:

Admin Reports Page:

  • Navigate to Offer Submissions → Offer Reports in the WordPress admin
  • Select an offer group (page title) from the dropdown
  • View a table with users as rows, products as columns, and desired quantities
  • Includes totals columns and rows for easy analysis
  • Download reports as CSV files

Frontend Reports Shortcode:

  • Use [ox_offer_report page_title="Your Page Title"] on any page
  • Displays the same report table as the admin page
  • Uses Kadence theme colors for consistent styling
  • Includes CSV download functionality
  • Editor and Administrator access (requires edit_posts capability)

Report Features:

  • User Totals: Sum of desired quantities across all products for each user
  • Product Totals: Sum of desired quantities across all users for each product
  • Grand Total: Total desired quantity across all users and products
  • Multiple Submissions: Automatically sums quantities from multiple submissions by the same user
  • CSV Export: Download reports in CSV format for further analysis

User Permissions & Roles

The plugin implements a comprehensive permission system for different user roles:

Permission Overview

Function Permission Required Editor Administrator
View Reports edit_posts
CSV Download ox_manage_offers
Commit Allocations ox_manage_offers
Reset Allocations ox_manage_offers
Finalise Offer ox_manage_offers
Unfinalise Offer manage_options
Migration Functions manage_options

Role Capabilities

Subscriber/Contributor:

  • ❌ No access to any report functions

Author:

  • ❌ No access to report functions
  • ✅ Can edit their own submissions (if any exist)

Editor:

  • ✅ Can view reports (admin page and shortcode)
  • ✅ Can download CSV reports
  • ✅ Can modify allocations (commit/reset)
  • ✅ Can finalise offers
  • ❌ Cannot unfinalise offers (Administrator only)
  • ❌ Cannot run migration functions (Administrator only)

Administrator:

  • ✅ Full access to all report functions
  • ✅ Can view, download, modify allocations, finalise/unfinalise offers
  • ✅ Can run migration functions

Custom Capability

The plugin automatically adds a custom capability ox_manage_offers to Editor and Administrator roles on activation. This provides granular control over offer management functions while maintaining security.

Critical Functions (Administrator Only):

  • Unfinalise: Most destructive action - can unlock finalised offers
  • Migration: Database migration functions that affect site structure

Configuration

Email Templates

The plugin includes two HTML email templates:

  • Admin Email: Sent to the configured admin email address
  • User Email: Sent to the user as a confirmation (optional)

Templates support the following placeholders:

Admin Email Template:

  • {user_name} - User's full name
  • {user_email} - User's email address
  • {user_phone} - User's phone number
  • {page_title} - Title of the page where the offer was submitted
  • {submission_date} - Date of submission
  • {products_list} - HTML table of requested products (now includes Desired column)
  • {additional_notes} - Any additional notes

User Email Template:

  • {user_name} - User's full name
  • {user_email} - User's email address
  • {page_title} - Title of the page where the offer was submitted
  • {submission_date} - Date of submission
  • {products_list} - HTML table of requested products (now includes Desired column)

Admin Settings & Submissions

  • Configure admin email address
  • Enable/disable user confirmation emails
  • Customize email templates
  • View and manage submissions: All submissions are stored as a custom post type (ox_offer_submission)
    • Go to Offer Submissions in the WordPress admin to view, search, filter, and manage all offer submissions
    • Each submission includes user info, product details, notes, and page title
    • Product Allocation: Edit allocated quantities for each product in submission details
    • Status Management: Track submissions through "Pending", "Reviewed", "Ordered", and "Delivered" statuses
  • Enhanced Reporting: Interactive allocation management with dropdown selections
  • Wine Offers Management: Dedicated post type (wine_offer) for managing wine-specific offers
    • Separate from general offer submissions for specialized wine offer management
    • Custom fields and functionality for wine industry requirements
  • Migration Tools: Built-in migration system for legacy data
    • Migrate existing posts from "Wine Offer" category to new wine_offer post type
    • Option to move original posts to trash after successful migration
    • Comprehensive error handling and progress tracking

Data Storage

The plugin stores all data in the WordPress database using custom post types and meta fields. Here's a detailed breakdown of where and how data is stored:

Database Tables

Custom Post Type: ox_offer_submission

  • Table: wp_posts (with post_type = 'ox_offer_submission')
  • Purpose: Stores each offer submission as a separate post
  • Key Fields:
    • post_title: Auto-generated title (e.g., "Offer Submission by John Doe")
    • post_content: Empty (not used)
    • post_status: Submission status ("publish", "draft", etc.)
    • post_author: WordPress user ID who made the submission
    • post_date: Submission timestamp
    • post_type: Always "ox_offer_submission"

Custom Post Type: wine_offer

  • Table: wp_posts (with post_type = 'wine_offer')
  • Purpose: Stores wine-specific offers and promotions
  • Key Fields:
    • post_title: Wine offer title
    • post_content: Wine offer description and details
    • post_status: Offer status ("publish", "draft", etc.)
    • post_author: WordPress user ID who created the offer
    • post_date: Offer creation timestamp
    • post_type: Always "wine_offer"

Meta Fields (wp_postmeta table)

Each submission stores the following meta fields:

User Information:

  • _user_name: Full name of the user (e.g., "John Doe")
  • _user_email: User's email address
  • _user_phone: User's phone number
  • _page_title: Title of the page/post where the offer was submitted

Product Data:

  • _products_data: JSON-encoded array containing all product information:
    [
      {
        "title": "Product Name",
        "image": "image-url.jpg",
        "listPrice": "100.00",
        "salePrice": "80.00",
        "minQty": 1,
        "idealQty": 3,
        "maxQty": 5,
        "allocatedQty": 3,
        "description": "Product description"
      }
    ]

Submission Management:

  • _additional_notes: Any additional notes from the user
  • _submission_status: Current status ("Pending", "Reviewed", "Ordered", "Delivered")

Offer Finalisation Data

On Offer Pages/Posts:

  • _offer_finalised: Boolean flag indicating if the offer is finalised
  • Tags: "Finalised" tag is added to the offer page/post when finalised

WordPress Options (wp_options table)

Plugin Settings:

  • ox_offer_subscription_admin_email: Admin email address for notifications
  • ox_offer_subscription_send_user_email: Boolean flag for user confirmation emails
  • ox_offer_subscription_admin_email_template: Custom admin email template
  • ox_offer_subscription_user_email_template: Custom user email template
  • ox_offer_subscription_version: Current plugin version for upgrade tracking

Data Relationships

User Submissions:

  • Multiple submissions per user are allowed
  • Each submission is independent and complete
  • Latest submission per user per offer is used for reports
  • Previous submissions are automatically deleted when new ones are submitted

Offer Groups:

  • Submissions are grouped by _page_title (the offer page/post title)
  • All submissions with the same _page_title form an "offer group"
  • Reports show all users and products within an offer group
  • Finalisation affects all submissions in an offer group

Product Tracking:

  • Products are identified by their title field
  • Same product titles across different submissions are treated as the same product
  • Quantities are tracked per user per product
  • Allocated quantities are stored separately from user-requested quantities

Data Management

Automatic Management:

  • Previous submissions are automatically replaced when users submit new offers
  • Old submissions are preserved unless manually deleted
  • No automatic deletion of production data

Manual Management:

  • Manually delete submissions via WordPress admin interface
  • Database queries can be run directly if needed
  • All data is preserved in standard WordPress database tables

Backup Considerations

Critical Data:

  • All submission data is in wp_posts and wp_postmeta tables
  • Plugin settings are in wp_options table
  • Offer finalisation flags are in wp_postmeta table

Backup Strategy:

  • Regular WordPress database backups include all plugin data
  • No separate backup process required
  • Plugin can be safely deactivated/reactivated without data loss

File Structure

ox-offer-subscription/
├── ox-offer-subscription.php          # Main plugin file
├── includes/                          # PHP classes
│   ├── class-ox-offer-subscription-blocks.php
│   ├── class-ox-offer-subscription-admin.php
│   ├── class-ox-offer-subscription-post-types.php
│   ├── class-ox-offer-subscription-rest.php
│   └── class-ox-offer-subscription-shortcodes.php
├── assets/                           # Frontend assets
│   ├── css/
│   │   ├── frontend.css
│   │   ├── editor.css
│   │   ├── admin.css
│   │   └── shortcodes.css
│   └── js/
│       ├── frontend.js
│       ├── editor.js
│       └── shortcodes.js
├── blocks/                          # Gutenberg block
│   └── product-offer/
│       └── block.json
├── admin-email-template.html        # Default admin email template
├── user-email-template.html         # Default user email template
└── README.md

Requirements

  • WordPress 5.0+
  • PHP 7.4+
  • Users must be logged in to submit offers

Version History

v1.1.7 (Latest)

  • Fixed: Whitespace trimming in block editor for product titles and prices
  • Enhanced: Automatic trimming of title, listPrice, and salePrice fields when blocks are saved
  • Improved: Price display reliability in admin reports by preventing trailing space mismatches
  • Quality: Prevents whitespace-related title matching issues between blocks and submissions
  • Note: Existing blocks with trailing spaces should be manually re-saved to apply trimming

v1.1.6

  • Enhanced Permissions: Added custom ox_manage_offers capability for granular access control
  • Editor Access: Editors can now perform all offer management functions except unfinalise
  • Security: Unfinalise and migration functions remain Administrator-only for security
  • Automatic Setup: Custom capability automatically assigned to Editor and Administrator roles
  • Documentation: Added comprehensive permissions and roles documentation

v1.1.5

  • Fixed: Wine offer post type lookup issues in admin reports
  • Enhanced: get_post_by_title() method now correctly searches wine_offer post type
  • Improved: Finalisation and price display functionality in admin reports

v1.1.4

  • Automation: Made ox_offer_submission post type public for automation tool compatibility
  • Publish Hooks: Added proper draft→publish workflow to trigger WordPress publish hooks
  • Debug: Added publish hook verification logging for troubleshooting
  • Enhanced: Wine offer tag integration with external filter software
  • Production: Optimized for automation workflows and external integrations

v1.1.3

  • Enhanced: Migration system now allows multiple runs for testing and flexibility
  • Removed: All migration restrictions and "run once" limitations
  • Improved: Post meta migration to include more custom meta fields
  • Fixed: Migration admin interface to work without status restrictions
  • Architecture: Cleaner migration code with better admin control

v1.1.2

  • Enhanced: Wine Offers post type now fully supports standard WordPress features
  • Added: Categories and tags support to wine_offer post type
  • Added: Trackbacks support for wine offers
  • Added: map_meta_cap and delete_with_user settings for proper WordPress integration
  • Fixed: Wine offers now behave exactly like standard WordPress posts

v1.1.1

  • Removed: Cleanup Test Data functionality and menu item
  • Updated: Documentation to reflect current functionality
  • Enhanced: Admin interface streamlined for production use
  • Architecture: Cleaner codebase with removed legacy cleanup features

v1.1.0

  • New: Wine Offers post type (wine_offer) for specialized wine offer management
  • New: Migration system for legacy "Wine Offer" category posts
  • New: Admin interface for wine offers with dedicated management tools
  • New: Migration tools with progress tracking and error handling
  • Enhanced: Admin menu with Wine Offers and Migration submenus
  • Architecture: Modular migration system with comprehensive data handling

v1.0.5

  • New: Clickable image popup functionality for full-size image viewing
  • New: Popup modal with close button and background click to close
  • Enhanced: Smooth animations and responsive design for popup
  • Enhanced: Popup positioning for sticky headers (z-index: 999999)
  • Enhanced: Close button positioning to avoid header interference
  • Cleaned: Upgrade system by removing all pre-1.0.0 upgrade code
  • Simplified: Upgrader to only handle 1.0.0+ versions
  • Enhanced: Image display to use WordPress 150x150 thumbnails
  • Improved: Plugin maintainability and performance

v1.0.4

  • Fixed: Production stability with comprehensive error handling
  • Enhanced: Upgrade process with try-catch blocks
  • Improved: Plugin initialization error handling
  • Security: Better error logging without breaking functionality
  • Architecture: Enhanced production environment compatibility

v1.0.3

  • New: Reset Allocations feature for admin reports
  • New: Admin-only button to reset all allocations to null
  • New: Automatic status reversion to "Pending" when allocations are reset
  • Enhanced: Admin workflow with additional allocation management options
  • Security: Proper nonce verification and capability checks for reset functionality
  • Architecture: Clean separation of reset logic with dedicated AJAX handler

v1.0.2

  • Fixed: Post lookup for price extraction and finalisation
  • Fixed: "Offer Page Not Found" errors in production environments
  • Enhanced: Production compatibility with post-based offer pages
  • Architecture: Replaced deprecated get_page_by_title() with custom method

v1.0.1

  • Production: Removed all debug logging for production use
  • Performance: Improved performance by eliminating debug output
  • Maintenance: Clean production-ready release with commented debug code

v1.0.0

  • New: Enhanced admin reports with interactive dropdown allocations
  • New: Offer finalisation system with frontend protection
  • New: Live total updates and visual indicators (★ and ✓)
  • New: Multiple submission tracking with asterisk indicators
  • New: Improved quantity validation with smart constraints
  • New: Existing submission replacement system
  • Enhanced: CSV export with current table state
  • Security: Admin-only finalisation controls

v0.4.0

  • New: Three-quantity system with Min Required, Desired, and Max Required fields
  • New: Smart validation enforcing Min ≤ Desired ≤ Max logic with real-time adjustments
  • New: Offer Reports system with admin page and shortcode functionality
  • New: Comprehensive reporting with user totals, product totals, and grand totals
  • New: CSV export functionality for reports
  • New: Multiple submissions handling (sums quantities from same user)
  • New: Cleanup Test Data admin page for removing test submissions
  • Enhanced: Email templates now include Desired quantity column
  • Enhanced: Admin interface updated to show Desired quantities prominently
  • Enhanced: Shortcode styling with Kadence theme integration
  • Enhanced: Responsive design for all report tables
  • Fixed: Backward compatibility for existing submissions without Desired field
  • Architecture: Improved error handling and debugging capabilities

v0.3.0

  • New: Product allocation system with editable allocated quantities
  • New: User frontend shortcode [ox_offer_submissions] for submission history
  • New: Page title tracking - automatically records submission source page
  • Enhanced: Admin interface with "Offer" column instead of "Page Title"
  • Enhanced: Status options updated to "Pending", "Reviewed", "Ordered", "Delivered"
  • Enhanced: Kadence theme color integration for consistent styling
  • Improved: Clean UI with streamlined display and removed unnecessary labels
  • Fixed: Min/max quantity logic with proper default values (0)
  • Fixed: Button text consistency ("Submit Request")
  • Fixed: Block selection and backend functionality
  • Architecture: Modular shortcode classes for better maintainability

v0.2.1

  • Added support for zero quantities in min/max fields
  • Products with both min and max set to zero are automatically filtered out
  • Improved form validation to handle zero quantity scenarios
  • Enhanced user experience for optional product selection

v0.2.0

  • Fixed missing editor.js and editor.css files
  • Improved block editor styling with tight spacing
  • Enhanced frontend layout with compact design
  • Fixed theme CSS conflicts with !important declarations
  • Optimized three-column layout (Image | Details | Quantity)
  • Improved responsive design and typography

v0.1.0

  • Initial release
  • Product Offer Gutenberg block
  • Dynamic form wrapping
  • REST API submission handling
  • Email notifications with HTML templates
  • Admin interface for submissions
  • Submissions stored as custom post type
  • User authentication and auto-population

Development

Contributing

This plugin is open source and contributions are welcome!

GitHub Repository: https://github.com/macdudeuk2/ox-offer-subscription

To contribute:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Local Development

Requirements:

  • WordPress 5.0+
  • PHP 7.4+
  • Gutenberg editor support

Setup:

  1. Clone the repository: git clone https://github.com/macdudeuk2/ox-offer-subscription.git
  2. Copy to your WordPress plugins directory: wp-content/plugins/ox-offer-subscription/
  3. Activate the plugin in WordPress admin
  4. Configure email settings
  5. Start developing!

Building for Distribution

The plugin is ready for distribution as-is. No build process required.

Support

For support and feature requests, please contact the development team.

License

GPL2+