Add additional services system (v0.5.0)
All checks were successful
Create Release Package / build-release (push) Successful in 1m0s

- Service CPT with pricing types: Included, Per Booking, Per Night
- ServiceCategory taxonomy with default categories
- Booking-services integration with service selector
- Real-time price calculation based on nights and quantity
- Services total and grand total display in booking admin

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-31 15:19:56 +01:00
parent aab3a4d1aa
commit 05f24fdec7
10 changed files with 1684 additions and 46 deletions

View File

@@ -5,6 +5,48 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.5.0] - 2026-01-31
### Added
- Additional Services System:
- Custom Post Type: Services (`bnb_service`)
- Service pricing types: Included (free), Per Booking (one-time), Per Night
- Service configuration: price, status, sort order, max quantity
- Custom admin columns with pricing type icons and status badges
- Filters by status and pricing type
- Service data helper methods for pricing calculations
- Service Categories Taxonomy (`bnb_service_category`)
- Non-hierarchical (tag-like) structure
- Icon selection per category
- Sort order for custom ordering
- Default categories: Food & Dining, Transportation, Wellness & Spa, Activities, Housekeeping
- Booking-Services Integration:
- Services meta box in Booking edit screen
- Checkbox-based service selection
- Quantity input for services with max_quantity > 1
- Real-time price calculation per service based on nights
- Services total display
- Price breakdown shows services cost
- Grand total (room + services) in admin list and pricing meta box
- Admin UI Enhancements:
- Service selector with pricing type indicators
- Included services badge
- Per-night price suffix display
- Service line totals with quantity support
- Services total summary in booking
- CSS styles for all service-related components
- JavaScript for dynamic service pricing calculations
### Changed
- Plugin.php updated to register Service CPT and ServiceCategory taxonomy
- Admin assets enqueued for Service post type screens
- Booking admin list shows total price including services
- Booking pricing meta box displays services breakdown and grand total
- Admin JavaScript extended with service pricing and selection logic
- Admin CSS includes comprehensive service styling
## [0.4.0] - 2026-01-31
### Added
@@ -248,6 +290,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Input sanitization and output escaping
- Server secret masking in license settings
[0.5.0]: https://src.bundespruefstelle.ch/magdev/wp-bnb/releases/tag/v0.5.0
[0.4.0]: https://src.bundespruefstelle.ch/magdev/wp-bnb/releases/tag/v0.4.0
[0.3.0]: https://src.bundespruefstelle.ch/magdev/wp-bnb/releases/tag/v0.3.0
[0.2.0]: https://src.bundespruefstelle.ch/magdev/wp-bnb/releases/tag/v0.2.0