Update README with WooCommerce integration documentation
- Add WooCommerce Integration and REST API to key features - Add WooCommerce 8.0+ to optional requirements - Add comprehensive WooCommerce Integration section with: - Enabling instructions - Product sync, cart/checkout, booking creation features - Order-booking synchronization details - PDF invoice documentation - Settings subtabs description - HPOS compatibility note - Admin columns info - Update FAQ to reflect WooCommerce is now implemented Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
94
README.md
94
README.md
@@ -19,9 +19,11 @@ WP BnB Management enables WordPress to act as a full management system for B&B h
|
|||||||
- **Auto-Updates**: Automatic update checks and installation from license server
|
- **Auto-Updates**: Automatic update checks and installation from license server
|
||||||
- **Development Mode**: License bypass for local development environments
|
- **Development Mode**: License bypass for local development environments
|
||||||
- **Contact Form 7 Integration**: Accept booking requests and inquiries through CF7 forms
|
- **Contact Form 7 Integration**: Accept booking requests and inquiries through CF7 forms
|
||||||
|
- **WooCommerce Integration**: Accept payments, auto-sync rooms as products, generate invoices
|
||||||
- **Dashboard**: Comprehensive admin dashboard with statistics and charts
|
- **Dashboard**: Comprehensive admin dashboard with statistics and charts
|
||||||
- **Reports**: Detailed reports with CSV and PDF export
|
- **Reports**: Detailed reports with CSV and PDF export
|
||||||
- **Prometheus Metrics**: Expose operational metrics for monitoring with Grafana
|
- **Prometheus Metrics**: Expose operational metrics for monitoring with Grafana
|
||||||
|
- **REST API**: Comprehensive API for external integrations
|
||||||
|
|
||||||
### Requirements
|
### Requirements
|
||||||
|
|
||||||
@@ -29,6 +31,7 @@ WP BnB Management enables WordPress to act as a full management system for B&B h
|
|||||||
- PHP 8.3 or higher
|
- PHP 8.3 or higher
|
||||||
- Valid license key
|
- Valid license key
|
||||||
- Contact Form 7 (optional, for booking forms)
|
- Contact Form 7 (optional, for booking forms)
|
||||||
|
- WooCommerce 8.0+ (optional, for payments and invoicing)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@@ -444,6 +447,95 @@ The dashboard includes:
|
|||||||
- Today's check-ins/check-outs
|
- Today's check-ins/check-outs
|
||||||
- Trend indicators
|
- Trend indicators
|
||||||
|
|
||||||
|
## WooCommerce Integration
|
||||||
|
|
||||||
|
The plugin integrates with WooCommerce to enable payment processing, automatic invoicing, and seamless order management.
|
||||||
|
|
||||||
|
### Enabling WooCommerce Integration
|
||||||
|
|
||||||
|
1. Install and activate WooCommerce 8.0 or higher
|
||||||
|
2. Navigate to **WP BnB → Settings → WooCommerce**
|
||||||
|
3. Enable "Enable WooCommerce Integration"
|
||||||
|
4. Configure product sync and invoice settings
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
**Product Synchronization:**
|
||||||
|
|
||||||
|
- Rooms are automatically synced as virtual WooCommerce products
|
||||||
|
- Products use SKU format `bnb-room-{id}` for tracking
|
||||||
|
- Price, description, and images are kept in sync
|
||||||
|
- Products created/updated on room save, deleted on room deletion
|
||||||
|
- Manual "Sync All Rooms" button in settings
|
||||||
|
|
||||||
|
**Cart & Checkout:**
|
||||||
|
|
||||||
|
- Add room bookings to WooCommerce cart with dates and guest count
|
||||||
|
- Real-time availability validation prevents double-booking
|
||||||
|
- Dynamic pricing calculated from room rates and services
|
||||||
|
- Special checkout fields for arrival time and special requests
|
||||||
|
- Guest information pre-filled from user profile
|
||||||
|
|
||||||
|
**Booking Creation:**
|
||||||
|
|
||||||
|
- Bookings automatically created on successful payment
|
||||||
|
- Guest records created from billing information
|
||||||
|
- Booking linked to WooCommerce order for reference
|
||||||
|
- Booking reference displayed on order confirmation
|
||||||
|
|
||||||
|
**Order-Booking Synchronization:**
|
||||||
|
|
||||||
|
- Order status changes sync to booking status:
|
||||||
|
- Order completed → Booking confirmed
|
||||||
|
- Order cancelled → Booking cancelled
|
||||||
|
- Order refunded → Booking cancelled (full refund)
|
||||||
|
- Partial refunds recorded without cancellation
|
||||||
|
- Bidirectional linking between orders and bookings
|
||||||
|
|
||||||
|
**PDF Invoices:**
|
||||||
|
|
||||||
|
- Automatic PDF invoice generation
|
||||||
|
- Configurable invoice number prefix (default: `INV-`)
|
||||||
|
- Sequential invoice numbering with configurable start number
|
||||||
|
- Auto-attach to WooCommerce order emails
|
||||||
|
- Secure storage in `wp-content/uploads/wp-bnb-invoices/`
|
||||||
|
- Manual generation from order admin
|
||||||
|
|
||||||
|
### WooCommerce Settings
|
||||||
|
|
||||||
|
**General Subtab:**
|
||||||
|
|
||||||
|
- Enable/disable WooCommerce integration
|
||||||
|
- Enable automatic product sync
|
||||||
|
- Enable auto-attach invoices to emails
|
||||||
|
|
||||||
|
**Products Subtab:**
|
||||||
|
|
||||||
|
- View sync status and product count
|
||||||
|
- Manual "Sync All Rooms Now" button
|
||||||
|
- Product category assignment
|
||||||
|
|
||||||
|
**Orders Subtab:**
|
||||||
|
|
||||||
|
- Order-booking status mapping
|
||||||
|
- View linked orders and bookings
|
||||||
|
|
||||||
|
**Invoices Subtab:**
|
||||||
|
|
||||||
|
- Invoice number prefix
|
||||||
|
- Starting invoice number
|
||||||
|
- Company details for invoice header
|
||||||
|
- PDF styling options
|
||||||
|
|
||||||
|
### HPOS Compatibility
|
||||||
|
|
||||||
|
The integration is fully compatible with WooCommerce High-Performance Order Storage (HPOS). Order meta is accessed using the modern `$order->get_meta()` and `$order->update_meta_data()` methods.
|
||||||
|
|
||||||
|
### Admin Columns
|
||||||
|
|
||||||
|
- **Bookings list**: "WC Order" column with link to order
|
||||||
|
- **WooCommerce Orders list**: "Booking" column with link to booking
|
||||||
|
|
||||||
## REST API
|
## REST API
|
||||||
|
|
||||||
The plugin provides a comprehensive REST API for integration with external applications, mobile apps, and third-party services.
|
The plugin provides a comprehensive REST API for integration with external applications, mobile apps, and third-party services.
|
||||||
@@ -668,7 +760,7 @@ Yes, guest data can be exported and deleted on request, and consent is tracked a
|
|||||||
|
|
||||||
### Does it integrate with WooCommerce?
|
### Does it integrate with WooCommerce?
|
||||||
|
|
||||||
WooCommerce integration for payments is planned for a future release.
|
Yes! WooCommerce integration is available for payment processing and invoicing. Rooms are synced as virtual products, bookings are created on successful payment, and PDF invoices are auto-generated and attached to order emails. Navigate to **WP BnB → Settings → WooCommerce** to enable and configure the integration.
|
||||||
|
|
||||||
### How is guest data secured?
|
### How is guest data secured?
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user