=== Rento King ===
Contributors: besmartweb, santukon
Tags: car rental, booking, fleet management, vehicle rental, reservation
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.2
Stable tag: 1.1.6
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.txt

A complete car rental management system for WordPress. Manage your fleet, locations, bookings, pricing, and customers — all from your WordPress admin.

== Description ==

Rento King gives you everything you need to run a car rental operation directly from WordPress. Whether you're a small local agency or managing a larger fleet across multiple locations, the plugin handles the operational side so you can focus on your business.

From the moment a customer searches for an available rental class to the moment they complete their booking, every step is covered: availability checking, pricing calculation, customer record creation, addon selection, payment, and confirmation email — all in one place.

The free version is fully functional and ready to use from day one. The Pro version extends it with Stripe payments, coupon codes, advanced scheduling, individual rental unit tracking, and deeper customization capabilities.

= What you can do with Rento King =

**Build your fleet**

Create rental classes with pricing, passenger capacity, luggage space, features, and gallery images. Set which pickup and return locations each rental class is available at, and define a minimum driver age per rental class if needed. The Pro version adds individual rental unit tracking — manage each car by license plate, make, model, color, damage history, and block periods for maintenance.

**Set up your locations**

Add as many pickup and return locations as you need — airports, downtown offices, hotel drop-offs. Each location has its own address, contact details (email, phone, WhatsApp), timezone, tax assignment, and operating hours. Set closed dates globally or per location. Define distance pricing between location pairs for one-way rentals. The Pro version lets you create multiple named opening time schedules per location, each with its own time range, pickup fee, and return fee.

**Configure your pricing**

The pricing system is built in layers. Price groups hold your base daily rates. Price plans override those rates for specific date ranges — perfect for peak season, holidays, or promotional periods. Duration discounts reward longer rentals. Early-bird discounts encourage advance bookings. Per-weekday rates let you set different daily prices for each day of the week. The Pro version adds minimum rental price floors.

**Accept bookings**

Place the booking form on any WordPress page using the `[rentoking view="booking-process"]` shortcode. Customers go through a clean 3-step process: search by location and dates, select a rental class, then fill in their details, pick addons, and pay. A standalone search form is also available with `[rentoking view="search-form"]`.

**Manage bookings from the admin**

The booking manager lets you create, view, edit, and update bookings. You can confirm, cancel, or perform other actions on any booking. Each booking record stores the full history: rental class, pricing breakdown, customer details, addons, payment status, and any notes.

**Keep customers informed**

Build email notification templates for any booking event — confirmation, cancellation, status change, or custom events you define. Use tokens to insert dynamic content like the customer name, pickup date, rental class, location, and total. The notification system supports custom events and custom tokens through WordPress filter hooks. Any email template can include a secure, tokenized link (the `[BOOKING_EDITION_LINK]` token) that lets the customer review their booking and complete payment on their own — the default unpaid-booking email uses it out of the box. The Pro version adds a "Send payment request" toggle when creating or editing a booking from the admin, which automates sending a ready-made quote email with that link.

= Free version features =

* Fleet: rental classes, body types, fuel types, transmission types, rental class features
* Location management: location types with icons, full address and contact info, timezone, tax assignment, single opening schedule, closed dates, gallery images
* Distance pricing: set fees for specific pickup/return location combinations
* Booking system: availability checking, full booking management from admin, status tracking, 5-minute expiration cron
* Customer records: customer profiles linked to bookings
* Pricing: price groups with daily rates, date-range price plans, duration discounts, early-bird discounts
* Addon services: extras and insurance types, per-day or per-booking pricing, stock management
* Multi-currency: create currencies with manual exchange rates
* Tax: configurable tax rates assignable to locations
* Payment methods: configure payment options per booking
* PayPal payment gateway
* Per-weekday pricing: set different daily rates for each day of the week within a price group
* Notifications: email templates with tokens, configurable trigger events
* Frontend shortcodes: booking process, search form, rental classes display (slider/grid/list), rental class details, location display (list/grid), location details, single property output, settings output
* Full Elementor integration: 10 widgets under a dedicated "Rento King" widget category — Search Form, Booking Process, Rental classes, Rental class Details, Rental class Property, Locations, Location Details, Location Property, Settings Property, and Booking Property (for building thank-you pages visually with live booking data preview)
* Google reCAPTCHA v3 on booking forms
* Translation ready — complete Spanish (es_ES) translation included
* Developer extensibility via action hooks and filter hooks
* `rentoking_field_make()` field factory for custom field creation (free)

= Pro version features =

* **Individual rental units management**: track each physical rental unit by license plate, make, model, year, color; damage tracking; block periods; reserved status
* **Stripe payment gateway**: Stripe Checkout Session integration
* **Coupon codes**: percentage or fixed-amount discount codes with date range, minimum duration, advance booking conditions, and per-rental class/addon applicability
* **Prepayment options**: configurable prepayment rules and types
* **Contract generation**: booking contract rendered from a configurable WordPress page template
* **After hours fees per location**: charge an extra fee when pickup or return happens outside a location's opening hours
* **Special date schedules**: date-specific schedule overrides per location
* **Minimum rental price**: set a price floor per price group and per price plan
* **Send payment request**: a one-click workflow when creating or editing a booking from the admin — toggle it to automatically email the customer a ready-made quote with the secure payment link (one-time use, expires in 48 hours). The tokenized payment link itself is part of the free version via the `[BOOKING_EDITION_LINK]` email token; Pro automates sending it
* **Open Exchange Rates sync**: automatic currency rate updates via scheduled cron job
* **Custom customer fields**: add fields to customer records from the settings panel
* **Enhanced booking fields**: additional custom fields on the booking record
* **Advanced pricing controls**: lock prices to original rates when base rates change
* **Custom price on the fly**: override rental class and extra prices per day or per booking while creating or editing a booking
* **Display out of stock**: keep sold-out rental classes visible in frontend search results with an "out of stock" label
* **Admin overbooking**: allow admin users to overbook units when needed, with a warning before confirming
* **Bypass booking conditions**: skip duration and advance-notice restrictions when creating or editing bookings from the admin
* **Change rental class**: swap the rental class on an existing booking without modifying the original invoice
* **Customer login & saved details**: customers can log in during the booking process and reuse previously entered details; one login can manage multiple customer profiles
* **Assign customer to WP user**: link a customer record to a WordPress user account for future bookings

= Shortcodes =

All shortcodes use the single `[rentoking view="..."]` format:

* `[rentoking view="booking-process"]` — complete 3-step booking flow
* `[rentoking view="search-form"]` — standalone booking search form
* `[rentoking view="rental-classes"]` — rental class cards (slider, grid, or list layout)
* `[rentoking view="rental-class-details" id="123"]` — details for a specific rental class
* `[rentoking view="locations"]` — location cards (list or grid layout)
* `[rentoking view="location-details" id="current"]` — details for a specific location
* `[rentoking view="rental-class-property" item-id="current" property="name"]` — output a single field from a rental class
* `[rentoking view="location-property" item-id="current" property="name"]` — output a single field from a location
* `[rentoking view="settings-property" property="company_name"]` — output a plugin setting value

Each shortcode accepts layout, theme (light/dark), density, color, and column parameters. The full parameter list is available in Rento King > Shortcodes in your admin.

= Extend the plugin your way =

Rento King is built around WordPress hooks. Action hooks fire on every booking lifecycle event — creation, update, status change, deletion — so you can connect external systems, trigger notifications, or log events. Filter hooks let you add custom fields to any form in the system.

The `rentoking_field_make()` function (available in the free version) creates field objects with method-chaining configuration, field dependencies, and custom save, sanitize, and display callbacks. Over 30 field types are supported.

= System requirements =

* WordPress 6.5 or higher
* PHP 8.2 or higher
* MySQL 5.6 or higher
* 128 MB memory (256 MB recommended)

== Installation ==

1. Go to WordPress Admin > Plugins > Add New > Upload Plugin.
2. Upload the plugin ZIP file and click Install Now.
3. Activate the plugin.
4. Rento King will appear in your WordPress admin sidebar.
5. Start with currencies: create at least one currency and set it as the main currency.
6. Add at least one location, one rental class linked to a price group, and configure pricing.
7. Configure email notifications.
8. The plugin automatically creates a Booking Process page with the `[rentoking view="booking-process"]` shortcode — add it to your site menu, and optionally place `[rentoking view="search-form"]` on any page (like your homepage) to send visitors there.

For the Pro version: after activating, go to Rento King > Account to enter and activate your license key.

== Frequently Asked Questions ==

= Is the free version usable on its own? =

Yes. The free version includes fleet rental classes, location management, full booking management, pricing, addons, multi-currency, PayPal payments, notifications, and the complete frontend booking flow. You can run a car rental operation entirely on the free version.

= Does the free version include payment processing? =

Yes. PayPal is included in the free version. Stripe is available in the Pro version.

= Where does the plugin store booking data? =

Bookings are stored in a dedicated custom database table — not as WordPress posts. This keeps booking queries fast and separate from other WordPress content. The table is only removed if you explicitly enable "delete data on deactivation" in settings before deactivating.

= Can I add custom fields to rental classes, customers, or bookings? =

Yes, through WordPress filter hooks using `rentoking_field_make()`, which is available in both free and Pro versions. You can add custom fields to any post type form with full control over validation, display, and save behavior.

= What is the difference between rental classes and rental units? =

Rental classes define the types of vehicles you offer — Economy, SUV, Luxury, etc. — and are what customers book. Rental units are the individual physical cars within each rental class, tracked by license plate, make, model, and damage history. Unit management (the Garage feature) requires the Pro version.

= Does the plugin work with Elementor? =

Yes. When Elementor is active, 10 widgets are registered under a dedicated "Rento King" panel category: Search Form, Booking Process, Rental classes, Rental class Details, Rental class Property, Locations, Location Details, Location Property, Settings Property, and Booking Property. Every widget has the same controls as its corresponding shortcode, configurable directly from the Elementor panel. The Booking Property widget also includes a live preview mode so you can build confirmation pages using real booking data.

= Can I set after hours fee per location? =

Yes, with the Pro version you can set an after-hours fee per location, applied automatically when the pickup or return time falls outside that location's opening hours.

= Can I manage multiple pickup and return locations? =

Yes. Create as many locations as needed. Rental classes can be restricted to specific pickup and return locations. Distance pricing rules let you charge differently when a rental class is picked up at one location and returned at another.

= Does it support seasonal pricing? =

Yes. Price plans let you override your base pricing for any date range. You can stack multiple price plans on one price group to cover the full year with different rates per period.

= How do I add a booking form to my site? =

On activation the plugin creates a "Booking Process" Rental page containing `[rentoking view="booking-process"]` and assigns it as the booking page — just link to it from your menu. You can also add the standalone search form `[rentoking view="search-form"]` to any page, such as your homepage; when a visitor searches, they are redirected to the booking page. To use a different booking page, create one under Rento King > Rental pages, add the shortcode, and assign it in Rento King > Settings > Rental pages.

= Do customers need an account to book? =

No. Customers can book as guests — each booking gets secure tokenized links for viewing the confirmation and completing payment. The Pro version adds an optional login at the last step of the booking process: customer details are stored, and returning customers who log in can reuse their previously entered details. One login can even manage several customer profiles.

= Is the plugin translation ready? =

Yes. All plugin strings are translatable (text domain `rento-king`), and the frontend booking flow ships with full i18n support. A complete Spanish (es_ES) translation is included out of the box.

== Screenshots ==

1. Customers search by location and dates with live availability and prices
2. Insurance and extra services with per-day or per-booking pricing
3. Customer details and booking summary before confirmation
4. Rental classes displayed in slider
5. Booking list with status, dates and customer at a glance
6. Calendar view of bookings across the fleet
7. Booking detail with pricing breakdown
8. Create a booking from the admin: search and select a rental class
9. Create a booking from the admin: booking summary
10. Location form with opening hours
11. Price groups and price plans in Gantt calendar view
12. Insurance editor with pricing options
13. Extras with stock control and pricing options
14. Email notification template editor with available tokens
15. General and booking settings

== External services ==

This plugin connects to the following third-party services. No data is sent to any of these services unless the relevant feature is enabled by the site administrator.

= PayPal =
Used for payment processing. When a customer initiates a payment, the plugin sends the booking amount, currency code, and a payment reference ID to the PayPal Orders API.

* Service: https://www.paypal.com
* Terms of Use: https://www.paypal.com/us/legalhub/useragreement-full
* Privacy Policy: https://www.paypal.com/us/legalhub/privacy-full

= OpenExchangeRates =
Used to synchronise live currency exchange rates, only if you configure an OpenExchangeRates API key in settings. When a sync runs, the plugin sends your API key and the requested currency symbols to the OpenExchangeRates API.

* Service: https://openexchangerates.org
* Terms of Use: https://openexchangerates.org/terms
* Privacy Policy: https://openexchangerates.org/privacy

= Google reCAPTCHA v3 =
Used to protect the booking form from automated bot submissions. When reCAPTCHA is enabled in settings, the booking page loads Google's reCAPTCHA api.js script in the visitor's browser, and an encrypted token and the visitor's IP address are sent to Google's siteverify API.

* Service: https://www.google.com/recaptcha
* Terms of Use: https://policies.google.com/terms
* Privacy Policy: https://policies.google.com/privacy

= ip2c.org =
The plugin bundles the vue-tel-input JavaScript library for international phone fields. When a phone field is rendered empty, the library sends a request to ip2c.org to detect the visitor country from their IP address and preselect the matching international dialing prefix. No request is made when the field already contains a value.

Data sent:
 * The visitor IP address is visible to the service as part of the standard HTTP request.
 * No booking data or personal plugin data is transmitted.

* Service: https://ip2c.org
* Terms of Use: https://about.ip2c.org/#termsofservice
* Privacy Policy: https://about.ip2c.org/#privacy

= Freemius =
The plugin includes the Freemius SDK, which manages the optional upgrade to the paid version. Diagnostic and usage data (site URL, WordPress, PHP and plugin versions, and the administrator email address) is sent to Freemius only if the administrator explicitly opts in on the plugin's opt-in screen; if the opt-in is skipped, no data is sent.

* Service: https://freemius.com
* Terms of Use: https://freemius.com/terms/
* Privacy Policy: https://freemius.com/privacy/

== Changelog ==

= 1.1.6 - 2026-08-17 =
* Initial Public Release

== Support ==

* Plugin Homepage: https://www.rentoking.com
* Documentation: https://docs.rentoking.com/
* Support Forum: https://wordpress.org/support/plugin/rento-king

== Privacy Policy ==

Customer data collected during the booking process is stored locally in your WordPress database. No personal data is sent to external servers except when processing payments through the configured payment gateway, or when fetching currency rates from Open Exchange Rates (only if an API key is configured). All data handling is subject to your site's own privacy policy.

== Source Code and Development ==

This plugin contains compiled and optimized production JavaScript/CSS assets for distribution (`assets/app/`).

The full human-readable development source code is bundled with the plugin: uncompressed JavaScript and Vue components live in the `src/` directory, SCSS sources in `src/styles/`, and the webpack build configuration in `webpack.config.js` at the plugin root. Run `npm install` followed by `npm run build` to regenerate the distributed assets from source. For live development, run `npm run dev` and add `define('RENTOKING_DEV_MODE', true);` to wp-config.php so the plugin loads assets from the dev server at localhost:8080.