-
Release 0.11.0
StableAll checks were successfulCreate Release Package / build-release (push) Successful in 1m11sreleased this
2026-02-03 21:40:47 +00:00 | 6 commits to main since this releaseAdded
- WooCommerce Integration System:
- New
src/Integration/WooCommerce/directory with complete integration Manager.php- Core integration manager with HPOS compatibility declarationProductSync.php- Room-to-WooCommerce-product synchronizationCartHandler.php- Cart item data, availability validation, dynamic pricingCheckoutHandler.php- Checkout field customization and pre-fillOrderHandler.php- Booking creation on payment completionInvoiceGenerator.php- PDF invoice generation using mPDFRefundHandler.php- Booking cancellation on full refundAdminColumns.php- Admin list cross-links between bookings and orders
- New
- Product Synchronization:
- Virtual WooCommerce products created for rooms (SKU:
bnb-room-{id}) - Auto-sync on room save, delete on room deletion
- Manual "Sync All Rooms" button in settings
- Bidirectional meta linking (room ↔ product)
- Virtual WooCommerce products created for rooms (SKU:
- Cart & Checkout:
- Booking data stored in cart items (room, dates, guests, services)
- Availability validation before add-to-cart and at checkout
- Dynamic price calculation based on dates and services
- Cart item display shows booking details (dates, guests, nights)
- Special requests and arrival time fields at checkout
- Booking summary display in checkout and order received page
- Order & Booking Integration:
- Automatic booking creation on
woocommerce_payment_complete - Guest record creation from order billing info
- Bidirectional order-booking links via meta keys
- Status synchronization (WC status → Booking status mapping)
- Booking reference generation (BNB-YYYY-NNNNN)
- Automatic booking creation on
- Invoice Generation:
- PDF invoices using existing mPDF dependency
- Invoice numbering with configurable prefix and start number
- Auto-attach invoices to WooCommerce order emails
- Download invoice button in admin order actions
- Secure storage in
wp-content/uploads/wp-bnb-invoices/
- Refund Handling:
- Full refund triggers booking cancellation
- Partial refund stores amount in booking meta without cancellation
- Refund info displayed in booking admin
wp_bnb_wc_should_cancel_on_refundfilter for customization
- Admin Enhancements:
- "WC Order" column in bookings list with order link and status
- "Booking" column in WC orders list with dates and status
- Row actions for cross-navigation between bookings and orders
- HPOS (High-Performance Order Storage) support
- WooCommerce Settings Tab with Subtabs:
- General: Enable integration, auto-confirm on payment, WC status indicator
- Products: Auto-sync toggle, product category selection, sync button
- Orders: Status mapping reference table
- Invoices: Auto-attach, prefix, starting number, logo, footer text
- Frontend Assets:
assets/css/wc-integration.css- Cart, checkout, and booking form stylesassets/js/wc-integration.js- Booking form handler, AJAX operations
Changed
- Plugin.php updated to initialize WooCommerce integration when WC is active
- Settings page now has eight tabs: General, Pricing, License, Updates, Metrics, API, WooCommerce
- HPOS compatibility declared via
FeaturesUtil::declare_compatibility()
Security
- Invoice storage protected with .htaccess (deny all)
- Nonce verification on all AJAX operations
- Capability checks for admin actions
- HPOS-compatible meta access using
$order->get_meta()/$order->update_meta_data()
Downloads
- WooCommerce Integration System: