Journal Upgrades Downgrades

A WordPress plugin that manages subscription upgrades and downgrades for The Golfer’s Journal. This plugin provides functionality to handle subscription changes, including premium upgrades, standard downgrades, and digital upgrades.

Features

  • Subscription Management
    • Upgrade to Premium subscription
    • Downgrade to Standard subscription
    • Digital subscription upgrades
    • Early renewal handling
    • Subscription merging capabilities
  • Gutenberg Blocks
    • Downgrade Link Block: A customizable block that displays a link to downgrade a subscription
      • Configurable link text
      • Option to display as a button
      • Automatic styling for non-button links
  • WooCommerce Integration
    • Seamless integration with WooCommerce Subscriptions
    • Custom cart handling for upgrades/downgrades
    • Automatic order processing
    • Subscription status management
  • User Interface
    • Custom upgrade/downgrade buttons in subscription views
    • Informational modals for upgrade/downgrade actions
    • Helper text and tooltips

Requirements

  • WordPress 5.8 or higher
  • WooCommerce
  • WooCommerce Subscriptions
  • The Golfers Journal theme

Installation

  1. Upload the plugin files to /wp-content/plugins/journal-upgrades-downgrades
  2. Activate the plugin through the WordPress admin interface
  3. Configure the plugin settings in the WordPress admin panel

Usage

Add the Downgrade Link block to any page or post where you want to display a subscription downgrade link:

  1. Click the “+” button in the editor
  2. Search for “Downgrade Subscription”
  3. Add the block to your content
  4. Configure the block settings:
    • Link Text: Customize the text displayed
    • Display as Button: Toggle between link and button styles

Subscription Management

The plugin automatically adds upgrade/downgrade options to subscription pages when:

  • A subscription is active
  • The subscription is eligible for upgrade/downgrade
  • The user has appropriate permissions

Development

Building Blocks

To build the Gutenberg blocks:

  1. Navigate to the block directory:
    cd blocks/downgrade-link
    
  2. Install dependencies:
    npm install
    
  3. Build the block:
    npm run build
    

File Structure

journal-upgrades-downgrades/
├── blocks/
│   └── downgrade-link/
│       ├── build/
│       ├── src/
│       ├── block.json
│       ├── render.php
│       └── style.css
├── includes/
│   ├── class-journal-upgrades-downgrades.php
│   ├── class-journal-upgrades-downgrades-blocks.php
│   └── class-journal-upgrades-downgrades-loader.php
├── public/
│   └── class-journal-upgrades-downgrades-public.php
└── readme.md

Support

For support, please contact the development team at The Golfer’s Journal.

License

This plugin is proprietary software owned by The Golfers Journal.


Table of contents