• Release 0.11.0
    All checks were successful
    Create Release Package / build-release (push) Successful in 1m11s
    Stable

    magdev released this 2026-02-03 21:40:47 +00:00 | 6 commits to main since this release

    Added

    • WooCommerce Integration System:
      • New src/Integration/WooCommerce/ directory with complete integration
      • Manager.php - Core integration manager with HPOS compatibility declaration
      • ProductSync.php - Room-to-WooCommerce-product synchronization
      • CartHandler.php - Cart item data, availability validation, dynamic pricing
      • CheckoutHandler.php - Checkout field customization and pre-fill
      • OrderHandler.php - Booking creation on payment completion
      • InvoiceGenerator.php - PDF invoice generation using mPDF
      • RefundHandler.php - Booking cancellation on full refund
      • AdminColumns.php - Admin list cross-links between bookings and orders
    • 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)
    • 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)
    • 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_refund filter 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 styles
      • assets/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