docs: add missing documentation for new features (checkout auto-registration, visual builder sections, appearance toggles, software & subscription guides)
This commit is contained in:
@@ -18,5 +18,11 @@ Showcase your services or product highlights in a clean grid layout. Supports 2,
|
||||
### Content Block
|
||||
A versatile text block with optional image. Great for "About Us" sections or storytelling. You can position the image on the left or right.
|
||||
|
||||
### Image Text Section
|
||||
A modern alternating layout combining media (images or video) on one side and structured content (headings, text, buttons) on the other. You can choose whether the image appears on the left or the right. These elements have independent styling options allowing for maximum layout creativity.
|
||||
|
||||
### Contact Form Section
|
||||
A fully functional form allowing visitors to get in touch. Includes configurable fields for Name, Email, Subject, and Message, and automatically connects to your site's contact email setting.
|
||||
|
||||
### Call to Action (CTA) Banner
|
||||
A high-converting strip designed to get clicks. Perfect for newsletter signups or limited-time offers.
|
||||
|
||||
@@ -17,3 +17,20 @@ We use a smart palette system.
|
||||
Choose from GDPR-compliant, locally hosted font pairings like:
|
||||
* **Modern**: Inter
|
||||
* **Editorial**: Playfair Display
|
||||
|
||||
## Advanced Appearance Settings
|
||||
You can fine tune how WooNooW interacts with your standard WordPress site from the **General** settings panel.
|
||||
|
||||
### SPA Mode
|
||||
The **Single Page Application Mode** ensures that customers stay inside the fast, React-based WooNooW app during their entire shopping journey.
|
||||
* **Enabled (Default):** All WooNooW page links (like shop, cart, account) will intercept standard WordPress navigation and load instantly without page refreshes.
|
||||
* **Disabled:** The store will behave like a traditional WordPress site, reloading the browser on every page change.
|
||||
|
||||
### WordPress Admin Bar Visibility
|
||||
For a cleaner frontend experience, you can hide the default black WordPress Admin Bar that normally appears at the top of the screen for logged-in administrators and staff.
|
||||
* Toggle **Hide Admin Bar on Frontend** to remove it from the Customer SPA. This ensures your sticky headers and floating elements display exactly as customers will see them.
|
||||
|
||||
### Layout Styles
|
||||
Choose how your container behaves on larger desktop monitors:
|
||||
* **Full Width:** Expands your headers, footers, and page sections to cover the entire width of the browser.
|
||||
* **Boxed:** Constrains the main content area to a maximum width (typically 1200px) and centers it on the screen.
|
||||
|
||||
@@ -1,17 +1,261 @@
|
||||
---
|
||||
title: Email Settings
|
||||
description: Transactional emails and SMTP.
|
||||
title: Email Notifications
|
||||
description: Configure transactional emails and notification templates
|
||||
---
|
||||
|
||||
WooNooW includes a modern notification system that replaces WooCommerce's default emails with beautiful, customizable templates.
|
||||
|
||||
Navigate to **Settings > Notifications** to manage all settings.
|
||||
|
||||
WooNooW replaces default WooCommerce emails with beautiful, responsive templates.
|
||||
---
|
||||
|
||||
## Email System Mode
|
||||
|
||||
WooNooW can use its own email templates or fall back to WooCommerce defaults.
|
||||
|
||||
| Mode | Description |
|
||||
|------|-------------|
|
||||
| **WooNooW** (default) | Uses WooNooW's responsive templates with rich customization |
|
||||
| **WooCommerce** | Disables WooNooW emails and uses native WC templates |
|
||||
|
||||
To change modes, go to **Settings > Notifications > Channels** and toggle the Email System setting.
|
||||
|
||||
> [!TIP]
|
||||
> Use WooCommerce mode if you have heavily customized WC email templates or use a third-party email customization plugin.
|
||||
|
||||
---
|
||||
|
||||
## Notification Dashboard
|
||||
|
||||
The main Notifications page shows a card-based overview:
|
||||
|
||||
### Recipients
|
||||
|
||||
| Card | Description | Path |
|
||||
|------|-------------|------|
|
||||
| **Staff** | Notifications for admins (orders, low stock, new customers) | `/settings/notifications/staff` |
|
||||
| **Customer** | Transactional emails (order updates, account, shipping) | `/settings/notifications/customer` |
|
||||
|
||||
### Channels
|
||||
|
||||
| Card | Description | Path |
|
||||
|------|-------------|------|
|
||||
| **Channel Configuration** | Email, Push, WhatsApp, Telegram settings | `/settings/notifications/channels` |
|
||||
| **Activity Log** | View sent/failed/pending notification history | `/settings/notifications/activity-log` |
|
||||
|
||||
---
|
||||
|
||||
## Email Events
|
||||
|
||||
WooNooW sends notifications for the following events. Each event can have separate templates for **Staff** and **Customer**.
|
||||
|
||||
### Order Events
|
||||
|
||||
| Event | Trigger | Staff | Customer |
|
||||
|-------|---------|:-----:|:--------:|
|
||||
| New Order | Order placed | ✅ | ✅ |
|
||||
| Order Processing | Payment received | ❌ | ✅ |
|
||||
| Order Completed | Order marked complete | ❌ | ✅ |
|
||||
| Order On-Hold | Order put on hold | ❌ | ✅ |
|
||||
| Order Cancelled | Order cancelled | ✅ | ✅ |
|
||||
| Order Refunded | Full/partial refund issued | ✅ | ✅ |
|
||||
| Order Failed | Payment failed | ✅ | ❌ |
|
||||
| Customer Note | Note added to order | ❌ | ✅ |
|
||||
|
||||
### Customer Events
|
||||
|
||||
| Event | Trigger | Staff | Customer |
|
||||
|-------|---------|:-----:|:--------:|
|
||||
| New Account | Customer registers | ✅ | ✅ |
|
||||
| Password Reset | Reset link requested | ❌ | ✅ |
|
||||
|
||||
### Inventory Events
|
||||
|
||||
| Event | Trigger | Staff | Customer |
|
||||
|-------|---------|:-----:|:--------:|
|
||||
| Low Stock | Product reaches low stock threshold | ✅ | ❌ |
|
||||
| Out of Stock | Product stock reaches 0 | ✅ | ❌ |
|
||||
|
||||
### Subscription Events
|
||||
|
||||
> [!NOTE]
|
||||
> Subscription events only appear when the **Subscriptions** module is enabled.
|
||||
|
||||
| Event | Trigger | Staff | Customer |
|
||||
|-------|---------|:-----:|:--------:|
|
||||
| Subscription Created | New subscription starts | ✅ | ✅ |
|
||||
| Subscription Renewed | Successful renewal payment | ❌ | ✅ |
|
||||
| Subscription Pending Cancel | Customer requests cancellation | ✅ | ✅ |
|
||||
| Subscription Cancelled | Subscription ended | ✅ | ✅ |
|
||||
| Subscription Expired | Subscription reached end date | ❌ | ✅ |
|
||||
| Subscription Paused | Customer paused subscription | ❌ | ✅ |
|
||||
| Subscription Resumed | Customer resumed subscription | ❌ | ✅ |
|
||||
| Renewal Failed | Payment failed | ✅ | ✅ |
|
||||
| Payment Reminder | Upcoming renewal notice | ❌ | ✅ |
|
||||
|
||||
---
|
||||
|
||||
## Template Editor
|
||||
Go to **Settings > Email** to customize:
|
||||
* **Order Confirmation**
|
||||
* **Shipping Updates**
|
||||
* **Account Notifications**
|
||||
|
||||
## SMTP Configuration
|
||||
Ensure your emails hit the inbox, not spam. We recommend using a dedicated SMTP service like SendGrid or Postmark.
|
||||
Click any event to open the template editor. You can customize:
|
||||
|
||||
- **Enable/Disable** - Toggle the notification on or off
|
||||
- **Subject Line** - Use variables like `{{order_number}}`
|
||||
- **Email Body** - Rich text editor with formatting
|
||||
|
||||
### Staff vs Customer Templates
|
||||
|
||||
Each event has two template tabs:
|
||||
- **Staff Template** - Sent to admin email, includes administrative details
|
||||
- **Customer Template** - Sent to customer, friendly and informative
|
||||
|
||||
---
|
||||
|
||||
## Available Variables
|
||||
|
||||
Use these placeholders in your templates. They are replaced with actual values when the email is sent.
|
||||
|
||||
### Order Variables
|
||||
|
||||
| Variable | Description |
|
||||
|----------|-------------|
|
||||
| `{{order_number}}` | Order ID |
|
||||
| `{{order_date}}` | Date order was placed |
|
||||
| `{{order_total}}` | Total amount |
|
||||
| `{{order_status}}` | Current status |
|
||||
| `{{order_items}}` | List of ordered products |
|
||||
| `{{shipping_method}}` | Selected shipping |
|
||||
| `{{payment_method}}` | Payment method used |
|
||||
|
||||
### Customer Variables
|
||||
|
||||
| Variable | Description |
|
||||
|----------|-------------|
|
||||
| `{{customer_name}}` | First + last name |
|
||||
| `{{customer_first_name}}` | First name only |
|
||||
| `{{customer_email}}` | Email address |
|
||||
| `{{billing_address}}` | Full billing address |
|
||||
| `{{shipping_address}}` | Full shipping address |
|
||||
|
||||
### Site Variables
|
||||
|
||||
| Variable | Description |
|
||||
|----------|-------------|
|
||||
| `{{site_name}}` | Your site title |
|
||||
| `{{site_url}}` | Your site URL |
|
||||
| `{{admin_email}}` | Admin email address |
|
||||
|
||||
### Subscription Variables
|
||||
|
||||
| Variable | Description |
|
||||
|----------|-------------|
|
||||
| `{{subscription_id}}` | Subscription ID |
|
||||
| `{{next_payment_date}}` | Next billing date |
|
||||
| `{{subscription_total}}` | Recurring amount |
|
||||
|
||||
### Account Variables
|
||||
|
||||
| Variable | Description |
|
||||
|----------|-------------|
|
||||
| `{{reset_link}}` | Password reset URL |
|
||||
| `{{user_login}}` | Username |
|
||||
|
||||
---
|
||||
|
||||
## Template Syntax
|
||||
|
||||
Email templates support **card blocks** for structured layouts and **buttons** for calls-to-action.
|
||||
|
||||
### Card Blocks
|
||||
|
||||
Wrap content in cards to create visual sections:
|
||||
|
||||
```
|
||||
[card:type]
|
||||
Your content here...
|
||||
[/card]
|
||||
```
|
||||
|
||||
#### Available Card Types
|
||||
|
||||
| Type | Use For | Styling |
|
||||
|------|---------|---------|
|
||||
| `default` | Standard content | White background |
|
||||
| `hero` | Header/intro | Gradient background (uses your Appearance colors) |
|
||||
| `success` | Confirmations | Light green background |
|
||||
| `info` | Information | Light blue background |
|
||||
| `warning` | Alerts | Light yellow background |
|
||||
| `basic` | Footer/muted text | No background, no padding |
|
||||
|
||||
### Button Syntax
|
||||
|
||||
Add clickable buttons inside cards:
|
||||
|
||||
```
|
||||
[button:solid]({{order_url}})View Your Order[/button]
|
||||
[button:outline]({{shop_url}})Continue Shopping[/button]
|
||||
```
|
||||
|
||||
| Style | Description |
|
||||
|-------|-------------|
|
||||
| `solid` | Filled button with primary color |
|
||||
| `outline` | Border-only button |
|
||||
| `link` | Plain text link |
|
||||
|
||||
### Example Template
|
||||
|
||||
```
|
||||
[card:hero]
|
||||
# Order Confirmed! 🎉
|
||||
Thank you for your order, {{customer_first_name}}!
|
||||
[/card]
|
||||
|
||||
[card]
|
||||
## Order Details
|
||||
|
||||
**Order:** #{{order_number}}
|
||||
**Date:** {{order_date}}
|
||||
**Total:** {{order_total}}
|
||||
|
||||
{{order_items}}
|
||||
|
||||
[button:solid]({{order_url}})View Your Order[/button]
|
||||
[/card]
|
||||
|
||||
[card:basic]
|
||||
Questions? Contact us at {{support_email}}
|
||||
[/card]
|
||||
```
|
||||
|
||||
> [!TIP]
|
||||
> Use Markdown formatting inside cards: `# Heading`, `**bold**`, `- lists`, etc.
|
||||
|
||||
---
|
||||
|
||||
## Email Delivery
|
||||
|
||||
WooNooW uses WordPress's built-in mail function (`wp_mail`).
|
||||
|
||||
> [!TIP]
|
||||
> For reliable delivery, install **WP Mail SMTP** and connect to a transactional email service (SendGrid, Postmark, Mailgun).
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Emails Not Sending
|
||||
|
||||
1. Check if the event is **enabled** in Settings > Notifications
|
||||
2. Verify the email system mode is set to **WooNooW**
|
||||
3. Check if WordPress can send emails (test with a contact form plugin)
|
||||
4. Review the **Activity Log** for failed deliveries
|
||||
|
||||
### Emails Going to Spam
|
||||
|
||||
1. Use a dedicated SMTP service via WP Mail SMTP
|
||||
2. Verify your domain (SPF, DKIM, DMARC records)
|
||||
3. Avoid spam trigger words in subject lines
|
||||
|
||||
### Test Emails
|
||||
|
||||
Use the **Send Test** button in the template editor to preview how emails appear in customer inboxes.
|
||||
|
||||
@@ -22,9 +22,19 @@ Navigate to **Settings > Modules** to manage these components.
|
||||
- **Subscriptions**: Enable recurring payments and subscription products.
|
||||
- **Pre-Orders**: Allow customers to order products before they are available.
|
||||
|
||||
### Developer
|
||||
- **Custom CSS/JS**: Inject custom code without editing theme files.
|
||||
- **Beta Features**: Early access to experimental features (use with caution).
|
||||
### Sales
|
||||
- **Licensing**: Sell software licenses with activation limits, expiration dates, and domain validation. Required for Software Distribution.
|
||||
- **Software Distribution**: Distribute software updates with version tracking, changelogs, and automatic update checking. Works with WordPress plugins/themes or any software type. *Requires Licensing module.*
|
||||
|
||||
## Module Dependencies
|
||||
|
||||
Some modules depend on others:
|
||||
|
||||
| Module | Requires |
|
||||
|--------|----------|
|
||||
| Software Distribution | Licensing |
|
||||
|
||||
If you try to enable a module without its dependencies, you'll be prompted to enable the required modules first.
|
||||
|
||||
## How to Enable/Disable
|
||||
1. Find the module card in the list.
|
||||
|
||||
@@ -1,19 +1,182 @@
|
||||
---
|
||||
title: Module Integration
|
||||
description: Integrating Addons usage with Module Registry
|
||||
date: 2024-01-31
|
||||
title: Module Registry
|
||||
description: Register custom modules and addons with WooNooW's unified module system
|
||||
---
|
||||
|
||||
WooNooW's modular architecture allows developers to create custom modules and addons that integrate seamlessly with the **Settings > Modules** UI.
|
||||
|
||||
## Overview
|
||||
|
||||
## Vision
|
||||
The Module Registry provides a unified system for:
|
||||
- Enable/disable toggle in the admin UI
|
||||
- Custom settings with schema-based forms
|
||||
- Dependencies on other modules
|
||||
- SPA route registration for custom settings pages
|
||||
|
||||
**Module Registry as the Single Source of Truth.**
|
||||
Functionality extensions—whether built-in Modules or external Addons—should live in the same UI.
|
||||
## Registering a Module
|
||||
|
||||
## Registration
|
||||
Add your module using the `woonoow/modules/registry` filter:
|
||||
|
||||
Addons register themselves via the `woonoow/addon_registry` filter.
|
||||
```php
|
||||
add_filter('woonoow/modules/registry', 'my_plugin_register_module');
|
||||
|
||||
function my_plugin_register_module($modules) {
|
||||
$modules['my-module'] = [
|
||||
'id' => 'my-module',
|
||||
'name' => __('My Custom Module', 'my-plugin'),
|
||||
'description' => __('Description of what this module does.', 'my-plugin'),
|
||||
'icon' => 'Sparkles', // Lucide icon name
|
||||
'category' => 'marketing', // marketing, sales, developer, etc.
|
||||
'requires' => [], // Array of required module IDs
|
||||
'settings' => [], // Settings schema array
|
||||
];
|
||||
|
||||
return $modules;
|
||||
}
|
||||
```
|
||||
|
||||
## Module Properties
|
||||
|
||||
| Property | Type | Required | Description |
|
||||
|----------|------|----------|-------------|
|
||||
| `id` | string | Yes | Unique identifier (lowercase, hyphens) |
|
||||
| `name` | string | Yes | Display name in the UI |
|
||||
| `description` | string | Yes | Brief description of functionality |
|
||||
| `icon` | string | No | Lucide icon name (e.g., `Package`, `Mail`) |
|
||||
| `category` | string | No | Grouping category: `marketing`, `sales`, `developer` |
|
||||
| `requires` | array | No | Array of module IDs this depends on |
|
||||
| `settings` | array | No | Settings schema for module configuration |
|
||||
|
||||
---
|
||||
|
||||
## Settings Schema
|
||||
|
||||
Define a settings schema to allow users to configure your module:
|
||||
|
||||
```php
|
||||
'settings' => [
|
||||
[
|
||||
'id' => 'api_key',
|
||||
'type' => 'text',
|
||||
'label' => __('API Key', 'my-plugin'),
|
||||
'description' => __('Enter your API key', 'my-plugin'),
|
||||
'default' => '',
|
||||
],
|
||||
[
|
||||
'id' => 'rate_limit',
|
||||
'type' => 'number',
|
||||
'label' => __('Rate Limit', 'my-plugin'),
|
||||
'description' => __('Max requests per minute', 'my-plugin'),
|
||||
'default' => 10,
|
||||
'min' => 1,
|
||||
'max' => 100,
|
||||
],
|
||||
[
|
||||
'id' => 'enable_debug',
|
||||
'type' => 'toggle',
|
||||
'label' => __('Enable Debug Mode', 'my-plugin'),
|
||||
'default' => false,
|
||||
],
|
||||
],
|
||||
```
|
||||
|
||||
### Available Field Types
|
||||
|
||||
| Type | Description | Properties |
|
||||
|------|-------------|------------|
|
||||
| `text` | Single-line text input | `default`, `placeholder` |
|
||||
| `textarea` | Multi-line text input | `default`, `rows` |
|
||||
| `number` | Numeric input with validation | `default`, `min`, `max`, `step` |
|
||||
| `toggle` | Boolean on/off switch | `default` (true/false) |
|
||||
| `select` | Dropdown selection | `default`, `options` (array of `{value, label}`) |
|
||||
| `checkbox` | Single checkbox | `default` (true/false) |
|
||||
| `color` | Color picker | `default` (#hex value) |
|
||||
| `url` | URL input with validation | `default`, `placeholder` |
|
||||
| `email` | Email input with validation | `default`, `placeholder` |
|
||||
| `password` | Password input (masked) | `default` |
|
||||
|
||||
### Common Field Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `id` | string | Unique field identifier |
|
||||
| `type` | string | Field type from list above |
|
||||
| `label` | string | Display label |
|
||||
| `description` | string | Help text below field |
|
||||
| `default` | mixed | Default value |
|
||||
|
||||
### Select Field Example
|
||||
|
||||
```php
|
||||
[
|
||||
'id' => 'display_mode',
|
||||
'type' => 'select',
|
||||
'label' => __('Display Mode', 'my-plugin'),
|
||||
'default' => 'grid',
|
||||
'options' => [
|
||||
['value' => 'grid', 'label' => __('Grid', 'my-plugin')],
|
||||
['value' => 'list', 'label' => __('List', 'my-plugin')],
|
||||
['value' => 'carousel', 'label' => __('Carousel', 'my-plugin')],
|
||||
],
|
||||
],
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Checking Module Status
|
||||
|
||||
Use `ModuleRegistry::is_enabled()` to check if your module is active:
|
||||
|
||||
```php
|
||||
use WooNooW\Core\ModuleRegistry;
|
||||
|
||||
if (ModuleRegistry::is_enabled('my-module')) {
|
||||
// Module is enabled, initialize features
|
||||
My_Module_Manager::init();
|
||||
}
|
||||
```
|
||||
|
||||
## Module Lifecycle Events
|
||||
|
||||
Hook into module enable/disable events:
|
||||
|
||||
```php
|
||||
// When any module is enabled
|
||||
add_action('woonoow/module/enabled', function($module_id) {
|
||||
if ($module_id === 'my-module') {
|
||||
// Create database tables, initialize settings, etc.
|
||||
My_Module_Manager::install();
|
||||
}
|
||||
});
|
||||
|
||||
// When any module is disabled
|
||||
add_action('woonoow/module/disabled', function($module_id) {
|
||||
if ($module_id === 'my-module') {
|
||||
// Cleanup if necessary
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## SPA Routes for Settings Pages
|
||||
|
||||
Addons can register custom React settings pages:
|
||||
|
||||
```php
|
||||
add_filter('woonoow/spa_routes', function($routes) {
|
||||
$routes[] = [
|
||||
'path' => '/settings/my-addon',
|
||||
'component_url' => plugin_dir_url(__FILE__) . 'dist/Settings.js',
|
||||
'title' => 'My Addon Settings',
|
||||
];
|
||||
return $routes;
|
||||
});
|
||||
```
|
||||
|
||||
## Addon Registry (External Addons)
|
||||
|
||||
External addons can also register via `woonoow/addon_registry` for extended metadata:
|
||||
|
||||
```php
|
||||
add_filter('woonoow/addon_registry', function($addons) {
|
||||
@@ -32,19 +195,49 @@ add_filter('woonoow/addon_registry', function($addons) {
|
||||
});
|
||||
```
|
||||
|
||||
This ensures your addon appears in the **WooNooW Modules** list with a consistent UI, toggle switch, and settings link.
|
||||
---
|
||||
|
||||
## Settings Pages
|
||||
|
||||
Addons can register their own SPA routes for settings pages.
|
||||
## Complete Example
|
||||
|
||||
```php
|
||||
add_filter('woonoow/spa_routes', function($routes) {
|
||||
$routes[] = [
|
||||
'path' => '/settings/shipping/my-addon',
|
||||
'component_url' => plugin_dir_url(__FILE__) . 'dist/Settings.js',
|
||||
'title' => 'My Addon Settings',
|
||||
];
|
||||
return $routes;
|
||||
});
|
||||
<?php
|
||||
namespace MyPlugin;
|
||||
|
||||
class MyModuleSettings {
|
||||
|
||||
public static function init() {
|
||||
add_filter('woonoow/modules/registry', [__CLASS__, 'register']);
|
||||
}
|
||||
|
||||
public static function register($modules) {
|
||||
$modules['my-module'] = [
|
||||
'id' => 'my-module',
|
||||
'name' => __('My Module', 'my-plugin'),
|
||||
'description' => __('Adds awesome features to your store.', 'my-plugin'),
|
||||
'icon' => 'Zap',
|
||||
'category' => 'marketing',
|
||||
'requires' => [], // No dependencies
|
||||
'settings' => [
|
||||
[
|
||||
'id' => 'feature_enabled',
|
||||
'type' => 'toggle',
|
||||
'label' => __('Enable Feature', 'my-plugin'),
|
||||
'default' => true,
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
return $modules;
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize on plugins_loaded
|
||||
add_action('plugins_loaded', ['MyPlugin\MyModuleSettings', 'init']);
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Check module status** before loading heavy features
|
||||
2. **Use the `woonoow/module/enabled` hook** to run installation routines only when needed
|
||||
3. **Specify dependencies** so WooNooW can prompt users to enable required modules
|
||||
4. **Provide meaningful descriptions** to help users understand what each module does
|
||||
|
||||
87
contents/docs/developer/api/licensing/index.mdx
Normal file
87
contents/docs/developer/api/licensing/index.mdx
Normal file
@@ -0,0 +1,87 @@
|
||||
---
|
||||
title: Licensing API
|
||||
description: Endpoints for activating, validating, and managing licenses
|
||||
date: 2024-01-31
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
The Licensing API allows external applications to interact with the WooNooW licensing system.
|
||||
|
||||
**Base URL**: `https://your-domain.com/wp-json/woonoow/v1`
|
||||
|
||||
---
|
||||
|
||||
## Public Endpoints
|
||||
|
||||
### Activate License
|
||||
|
||||
Activates a license key for a specific domain.
|
||||
|
||||
```http
|
||||
POST /licenses/activate
|
||||
```
|
||||
|
||||
#### Activation Parameters
|
||||
|
||||
| Body Params | Type | Required | Description |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| `license_key` | `string` | **Yes** | The license key to activate |
|
||||
| `domain` | `string` | **Yes** | The domain where the software is installed |
|
||||
| `activation_mode` | `string` | No | Set to `oauth` to trigger OAuth flow |
|
||||
|
||||
#### Responses
|
||||
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"activation_id": 123,
|
||||
"license_key": "XXXX-YYYY-ZZZZ-WWWW",
|
||||
"status": "active"
|
||||
}
|
||||
```
|
||||
|
||||
If OAuth is required:
|
||||
|
||||
```json
|
||||
{
|
||||
"success": false,
|
||||
"oauth_required": true,
|
||||
"oauth_redirect": "https://vendor.com/my-account/license-connect/...",
|
||||
"state": "abc12345"
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Validate License
|
||||
|
||||
Checks if a license key is valid and active for the current domain.
|
||||
|
||||
```http
|
||||
POST /licenses/validate
|
||||
```
|
||||
|
||||
#### Validation Parameters
|
||||
|
||||
| Body Params | Type | Required | Description |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| `license_key` | `string` | **Yes** | The license key to validate |
|
||||
| `domain` | `string` | **Yes** | The domain to check against |
|
||||
|
||||
---
|
||||
|
||||
### Deactivate License
|
||||
|
||||
Deactivates a license for the current domain.
|
||||
|
||||
```http
|
||||
POST /licenses/deactivate
|
||||
```
|
||||
|
||||
#### Deactivation Parameters
|
||||
|
||||
| Body Params | Type | Required | Description |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| `license_key` | `string` | **Yes** | The license key to deactivate |
|
||||
| `domain` | `string` | **Yes** | The domain to remove |
|
||||
218
contents/docs/developer/software-updates/index.mdx
Normal file
218
contents/docs/developer/software-updates/index.mdx
Normal file
@@ -0,0 +1,218 @@
|
||||
---
|
||||
title: Software Updates API
|
||||
description: Distribute software updates with license-based access control
|
||||
---
|
||||
|
||||
The Software Distribution module enables selling WordPress plugins, themes, or any software with automatic update checking, secure downloads, and version management.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Enable **Licensing** module (required)
|
||||
- Enable **Software Distribution** module in Settings → Modules
|
||||
- Configure downloadable products with software distribution enabled
|
||||
|
||||
## Product Configuration
|
||||
|
||||
When editing a downloadable product in WooCommerce, you'll see a new "Software Distribution" section:
|
||||
|
||||
| Field | Description |
|
||||
|-------|-------------|
|
||||
| **Enable Software Updates** | Allow customers to check for updates via API |
|
||||
| **Software Slug** | Unique identifier (e.g., `my-plugin`) used in API calls |
|
||||
| **Current Version** | Latest version number (e.g., `1.2.3`) |
|
||||
|
||||
### WordPress Integration (Optional)
|
||||
|
||||
Enable "WordPress Plugin/Theme" to add these fields:
|
||||
|
||||
- **Requires WP** - Minimum WordPress version
|
||||
- **Tested WP** - Tested up to WordPress version
|
||||
- **Requires PHP** - Minimum PHP version
|
||||
|
||||
## API Endpoints
|
||||
|
||||
### Check for Updates
|
||||
|
||||
```
|
||||
GET /wp-json/woonoow/v1/software/check
|
||||
POST /wp-json/woonoow/v1/software/check
|
||||
```
|
||||
|
||||
**Parameters:**
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|-----------|------|----------|-------------|
|
||||
| `license_key` | string | Yes | Valid license key |
|
||||
| `slug` | string | Yes | Software slug |
|
||||
| `version` | string | Yes | Current installed version |
|
||||
| `site_url` | string | No | Site URL for tracking |
|
||||
|
||||
**Response:**
|
||||
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"update_available": true,
|
||||
"product": {
|
||||
"name": "My Plugin",
|
||||
"slug": "my-plugin"
|
||||
},
|
||||
"current_version": "1.0.0",
|
||||
"latest_version": "1.2.0",
|
||||
"changelog": "## What's New\n- Added feature X\n- Fixed bug Y",
|
||||
"release_date": "2026-02-01 12:00:00",
|
||||
"download_url": "https://your-store.com/wp-json/woonoow/v1/software/download?token=..."
|
||||
}
|
||||
```
|
||||
|
||||
For WordPress plugins/themes, an additional `wordpress` object is included:
|
||||
|
||||
```json
|
||||
{
|
||||
"wordpress": {
|
||||
"requires": "6.0",
|
||||
"tested": "6.7",
|
||||
"requires_php": "7.4",
|
||||
"icons": { "1x": "...", "2x": "..." },
|
||||
"banners": { "low": "...", "high": "..." }
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Download File
|
||||
|
||||
```
|
||||
GET /wp-json/woonoow/v1/software/download?token=<token>
|
||||
```
|
||||
|
||||
Download tokens are single-use and expire after 5 minutes.
|
||||
|
||||
### Get Changelog
|
||||
|
||||
```
|
||||
GET /wp-json/woonoow/v1/software/changelog?slug=<slug>
|
||||
GET /wp-json/woonoow/v1/software/changelog?slug=<slug>&version=<version>
|
||||
```
|
||||
|
||||
Returns version history with changelogs.
|
||||
|
||||
## WordPress Client Integration
|
||||
|
||||
Include the updater class in your plugin or theme to enable automatic updates:
|
||||
|
||||
### 1. Copy the Updater Class
|
||||
|
||||
Copy `class-woonoow-updater.php` from the WooNooW plugin's `templates/updater/` directory to your plugin.
|
||||
|
||||
### 2. Initialize in Your Plugin
|
||||
|
||||
```php
|
||||
<?php
|
||||
// In your main plugin file
|
||||
|
||||
require_once plugin_dir_path(__FILE__) . 'includes/class-woonoow-updater.php';
|
||||
|
||||
new WooNooW_Updater([
|
||||
'api_url' => 'https://your-store.com/',
|
||||
'slug' => 'my-plugin',
|
||||
'version' => MY_PLUGIN_VERSION,
|
||||
'license_key' => get_option('my_plugin_license_key'),
|
||||
'plugin_file' => __FILE__,
|
||||
]);
|
||||
```
|
||||
|
||||
### 3. For Themes
|
||||
|
||||
```php
|
||||
<?php
|
||||
// In your theme's functions.php
|
||||
|
||||
require_once get_theme_file_path('includes/class-woonoow-updater.php');
|
||||
|
||||
new WooNooW_Updater([
|
||||
'api_url' => 'https://your-store.com/',
|
||||
'slug' => 'my-theme',
|
||||
'version' => wp_get_theme()->get('Version'),
|
||||
'license_key' => get_option('my_theme_license_key'),
|
||||
'theme_slug' => 'my-theme',
|
||||
]);
|
||||
```
|
||||
|
||||
## Non-WordPress Integration
|
||||
|
||||
For other software types, make HTTP requests directly to the API:
|
||||
|
||||
### JavaScript Example
|
||||
|
||||
```javascript
|
||||
async function checkForUpdates(licenseKey, currentVersion) {
|
||||
const response = await fetch('https://your-store.com/wp-json/woonoow/v1/software/check', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
license_key: licenseKey,
|
||||
slug: 'my-software',
|
||||
version: currentVersion,
|
||||
}),
|
||||
});
|
||||
|
||||
const data = await response.json();
|
||||
|
||||
if (data.update_available) {
|
||||
console.log(`Update available: v${data.latest_version}`);
|
||||
// Download from data.download_url
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
```
|
||||
|
||||
### Python Example
|
||||
|
||||
```python
|
||||
import requests
|
||||
|
||||
def check_for_updates(license_key: str, current_version: str) -> dict:
|
||||
response = requests.post(
|
||||
'https://your-store.com/wp-json/woonoow/v1/software/check',
|
||||
json={
|
||||
'license_key': license_key,
|
||||
'slug': 'my-software',
|
||||
'version': current_version,
|
||||
}
|
||||
)
|
||||
|
||||
data = response.json()
|
||||
|
||||
if data.get('update_available'):
|
||||
print(f"Update available: v{data['latest_version']}")
|
||||
# Download from data['download_url']
|
||||
|
||||
return data
|
||||
```
|
||||
|
||||
## Managing Versions
|
||||
|
||||
Use the Admin SPA at **Products → Software Versions** to:
|
||||
|
||||
- View all software-enabled products
|
||||
- Release new versions with changelogs
|
||||
- Track download counts per version
|
||||
- Set current (latest) version
|
||||
|
||||
## Error Codes
|
||||
|
||||
| Error | Description |
|
||||
|-------|-------------|
|
||||
| `invalid_license` | License key is invalid or expired |
|
||||
| `product_not_found` | Software slug doesn't match any product |
|
||||
| `software_disabled` | Software distribution not enabled for product |
|
||||
| `invalid_token` | Download token expired or already used |
|
||||
| `module_disabled` | Software Distribution module is disabled |
|
||||
|
||||
## Security
|
||||
|
||||
- All API endpoints require valid license key
|
||||
- Download tokens are single-use and expire in 5 minutes
|
||||
- Rate limiting: 10 requests/minute per license (configurable)
|
||||
- IP address logged with download tokens
|
||||
45
contents/docs/developer/software-updates/store-owner.mdx
Normal file
45
contents/docs/developer/software-updates/store-owner.mdx
Normal file
@@ -0,0 +1,45 @@
|
||||
---
|
||||
title: Store Owner Guide
|
||||
description: Managing and distributing digital software products.
|
||||
---
|
||||
|
||||
WooNooW's Software Updates module allows you to securely sell, distribute, and manage updates for your digital products, plugins, or applications.
|
||||
|
||||
## Enabling the Software Module
|
||||
To begin distributing software, you must first enable the module:
|
||||
1. Navigate to **WooNooW > Settings > Modules**.
|
||||
2. Toggle on the **Software Updates** module.
|
||||
3. Save changes.
|
||||
|
||||
## Creating a Software Product
|
||||
Software products are created by extending standard WooCommerce virtual products.
|
||||
|
||||
1. Go to **Products > Add New** in WordPress.
|
||||
2. Check both the **Virtual** and **Downloadable** checkboxes in the Product Data panel.
|
||||
3. In the left tabs, select **Software Details**.
|
||||
4. Configure the following specific to your software:
|
||||
- **Software Type:** Identify the platform (e.g., WordPress Plugin, Desktop App).
|
||||
- **Current Version:** The latest release version (e.g., 1.2.0).
|
||||
- **Requires PHP/WP:** Set minimum system requirements (optional).
|
||||
- **Tested Up To:** Set the maximum compatible platform version (optional).
|
||||
5. Add your downloadable file under the standard **Downloadable** tab.
|
||||
6. Publish the product.
|
||||
|
||||
## Managing Version History
|
||||
When you release an update:
|
||||
1. Navigate to **Store > Software Versions** in your WooNooW Admin SPA.
|
||||
2. Click **Create Release**.
|
||||
3. Select the software product you are updating.
|
||||
4. Enter the new **Version Number** (e.g., 1.3.0).
|
||||
5. Provide a detailed **Changelog**. Use Markdown to list features, fixes, and notes.
|
||||
6. Publish the release.
|
||||
|
||||
When customers check for updates within their application (using the API), the system will serve them the latest version and display this changelog.
|
||||
|
||||
## Licensing
|
||||
You can choose to attach License Keys to your software to prevent unauthorized use.
|
||||
1. Enable the **Licensing** module in Settings.
|
||||
2. When configuring your Software Product, check the **Requires License** box.
|
||||
3. Define the activation limit (e.g., 1 site, 5 sites, or unlimited).
|
||||
|
||||
When a customer purchases the software, the system will automatically generate a unique license key and deliver it in the checkout confirmation and email receipt. Customers can manage their active activations from their **My Account > Licenses** dashboard.
|
||||
@@ -62,11 +62,18 @@ After reviewing everything:
|
||||
|
||||
## Features
|
||||
|
||||
### Guest Checkout
|
||||
### Guest Checkout & Auto-Registration
|
||||
|
||||
Allow customers to checkout without creating an account.
|
||||
Allow customers to checkout without creating an account upfront.
|
||||
Configure in **WooCommerce → Settings → Accounts & Privacy**.
|
||||
|
||||
**Seamless Auto-Registration:**
|
||||
WooNooW implements a frictionless auto-registration flow. If a guest checks out with an email that isn't registered, the system will:
|
||||
1. Automatically create an account in the background.
|
||||
2. Securely generate a random password.
|
||||
3. Automatically log the user in immediately after checkout.
|
||||
4. Send an email containing their new login credentials so they can track their order and easily return.
|
||||
|
||||
### Coupon Codes
|
||||
|
||||
Customers can apply discount codes:
|
||||
|
||||
39
contents/docs/resources/changelog/index.mdx
Normal file
39
contents/docs/resources/changelog/index.mdx
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: Changelog
|
||||
description: Updates and version history for WooNooW Plugin
|
||||
---
|
||||
|
||||
Track all updates, new features, bug fixes, and improvements for WooNooW Plugin.
|
||||
|
||||
## Version 1.0.0 (Initial Release)
|
||||
|
||||
**Release Date:** February 2026
|
||||
|
||||
### 🎉 Features
|
||||
|
||||
- **Full WooCommerce Enhancement Suite** - Complete storefront modernization
|
||||
- **Admin SPA** - Modern React-based admin dashboard
|
||||
- **Customer SPA** - Fast, mobile-first shopping experience
|
||||
- **Page Builder** - Visual drag-and-drop page creation
|
||||
- **Licensing Module** - Sell software licenses with activation management
|
||||
- **Software Distribution** - Distribute updates for WordPress plugins/themes
|
||||
- **Subscription Module** - Recurring billing and subscription management
|
||||
- **Newsletter Module** - Email marketing integration
|
||||
- **Wishlist Module** - Customer wishlists and save-for-later
|
||||
- **RajaOngkir Integration** - Indonesia shipping rates
|
||||
|
||||
### 🛠️ Core Components
|
||||
|
||||
- Visual Editor with live preview
|
||||
- Header & Footer builder
|
||||
- Dynamic section components (Hero, Features, Testimonials, etc.)
|
||||
- Appearance customization (colors, typography, layouts)
|
||||
- Email notification system
|
||||
- Security settings (2FA, rate limiting)
|
||||
|
||||
### 📦 Developer Tools
|
||||
|
||||
- REST API endpoints
|
||||
- Hook & filter system
|
||||
- Addon bridge architecture
|
||||
- React component integration
|
||||
48
contents/docs/store/subscriptions/index.mdx
Normal file
48
contents/docs/store/subscriptions/index.mdx
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
title: Subscriptions Guide
|
||||
description: Configuring and managing recurring payments.
|
||||
---
|
||||
|
||||
WooNooW's Subscriptions module seamlessly integrates with your store, enabling recurring revenue streams for your products or services.
|
||||
|
||||
## Setup Requirements
|
||||
To use Subscriptions, ensure:
|
||||
1. The **Subscriptions** module is toggled ON under **WooNooW > Settings > Modules**.
|
||||
2. Your payment gateway supports tokenization / recurring payments (e.g., Stripe, PayPal).
|
||||
|
||||
## Creating a Subscription Product
|
||||
1. Go to **Products > Add New** in WordPress.
|
||||
2. In the Product Data dropdown, select **Simple Subscription** or **Variable Subscription**.
|
||||
3. Configure the billing schedule:
|
||||
- **Subscription Price:** The recurring amount (e.g., $15).
|
||||
- **Billing Interval/Period:** How often they are charged (e.g., every 1 month).
|
||||
- **Expire After:** When the subscription automatically ends (leave empty for "Never expire").
|
||||
- **Sign-up Fee:** Optional one-time fee added to the first payment.
|
||||
- **Free Trial:** Offer an initial period at no cost (e.g., 14 days).
|
||||
4. Publish the product.
|
||||
|
||||
## Managing Subscriptions (Admin)
|
||||
Store owners can view and manage all active, paused, or cancelled subscriptions directly from the Admin SPA.
|
||||
1. Navigate to **Store > Subscriptions**.
|
||||
2. Click on any Subscription ID to view details.
|
||||
3. From the detail view, you can:
|
||||
- **Pause** an active subscription.
|
||||
- **Cancel** a subscription.
|
||||
- **Change Next Payment Date**.
|
||||
- **Process Renewal** manually.
|
||||
|
||||
## Customer Experience
|
||||
When a customer purchases a subscription, they gain access to a self-service dashboard in their account:
|
||||
1. Customers navigate to **My Account > Subscriptions**.
|
||||
2. They can view the status, next payment date, and associated orders.
|
||||
3. They have full autonomy to actions like **Pause**, **Resume**, or **Cancel** their own subscriptions based on the permissions you configure in the module settings.
|
||||
4. If a payment fails, customers will see a clear **Pay Now** button to update their billing details.
|
||||
|
||||
## Automated Emails
|
||||
The notification system automatically handles subscription lifecycle events:
|
||||
- **New Subscription:** Welcome email for the recurring plan.
|
||||
- **Renewal:** Receipt for a successful periodic charge.
|
||||
- **Failed Renewal:** Action required notification to update payment info.
|
||||
- **Cancelled/Expired:** Confirmation of plan termination.
|
||||
|
||||
You can customize these templates under **Settings > Notifications**.
|
||||
Reference in New Issue
Block a user