=== MotoPress Hotel Booking Zapier Integration (Beta) ===
Contributors: motopress
Tags: hotel booking, zapier, automation, webhooks, rest api
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect MotoPress Hotel Booking to the private Zapier beta with booking event triggers.

== Description ==

Hotel Booking Zapier Integration connects MotoPress Hotel Booking to the private MotoPress Hotel Booking Zapier app shared by invitation during the beta.

The add-on exposes OAuth2 and subscription REST endpoints for Zapier, listens to Hotel Booking booking events, and sends booking payloads to Zapier instant trigger URLs.

V1 triggers:

* New Pending User Booking
* New Pending Admin Booking
* Booking Confirmed
* Booking Cancelled
* Booking Status Changed

The plugin is read-only from Zapier's perspective. It sends booking data to Zapier but does not create, update, or cancel bookings from Zapier.

== Requirements ==

* WordPress 6.2 or newer
* PHP 7.4 or newer
* MotoPress Hotel Booking
* A Zapier account and invitation to the private MotoPress Hotel Booking app

== Installation ==

1. Upload the `mphb-zapier` folder to `/wp-content/plugins/`.
2. Activate Hotel Booking Zapier Integration in WordPress.
3. Make sure MotoPress Hotel Booking is active.
4. Go to Accommodation > Settings > Extensions > Zapier.
5. Join the private Zapier app with the invitation link: https://zapier.com/developer/public-invite/243558/d95cdde93f918c6c354f489aa9e09a6b/.
6. Create a Zap with the private MotoPress Hotel Booking app, choose a trigger, and select Add a new account.
7. Enter the public HTTPS URL shown in the plugin's WordPress Website setting.

The Zapier app discovers the site-specific OAuth URLs from the plugin, so users do not need to copy Authorize URL or Token URL values.
When the account is created, Zapier opens the WordPress authorization URL in a popup. If the administrator is not logged in, WordPress shows its normal login page. After login, the plugin checks administrator access and redirects back to Zapier; there is no separate approval screen in the current private-beta flow.

== Frequently Asked Questions ==

= Does this work with Webhooks by Zapier? =

No. This plugin is designed for the private MotoPress Hotel Booking Zapier app with OAuth2 and instant REST hook triggers.

= Can Zapier create or update bookings? =

No. V1 only sends Hotel Booking events to Zapier.

= Are iCal bookings sent as new pending bookings? =

No. The new pending booking triggers are for frontend bookings created by users. iCal-imported bookings are not sent by those triggers.

= When does Booking Confirmed fire? =

It fires when Hotel Booking changes a booking status to `confirmed`, including when an admin approves a pending booking request.

= What booking data is sent to Zapier? =

Payloads include booking ID, status, dates and times, guest contact fields, guest counts, reserved accommodation line items, nested service line items, rate details, total, currency, payment status if available, admin URL, price breakdown, and site information. Guest email addresses and phone numbers are partially masked in the Zapier payload for privacy.

= Does the plugin send card data? =

No. Sensitive payment/card data must not be sent in Zapier payloads.

== Changelog ==

= 1.0.0, Sep 22 2026 =
* Initial release.
