=== erphome.pl — Widget Rezerwacji Apartamentu ===
Contributors: erphome
Tags: booking, reservation, vacation rental, apartment, availability calendar
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Show your apartment's live availability calendar and a commission-free booking button from erphome.pl, right on your WordPress site.

== Description ==

This plugin requires an active account on [erphome.pl](https://erphome.pl), a
commission-free booking platform for apartment and vacation rental owners in
Poland. If you already have a booking page there, this plugin displays the
same availability calendar and "book now" button on your WordPress site,
without pasting `<script>` code into the editor.

If your erphome.pl account has calendar sync (iCal) set up with Airbnb or
Booking.com, the widget shows that same combined, up-to-date availability —
no separate configuration needed in WordPress.

= What it adds =

* **Shortcode** `[erphome_widget]` — works anywhere shortcodes are
  supported: posts, pages, text widgets, most page builders.
* **Gutenberg block** "ErpHome — Booking Widget" with a live preview and
  sidebar controls for the apartment and size.
* **Classic sidebar widget** for themes built around the Widgets screen.
* A **settings page** (Settings → ErpHome) where you paste the link copied
  from your erphome.pl panel (Settings → Calendars) — the account and
  apartment slugs are detected automatically.

= Accounts with multiple apartments =

The `apt` attribute embeds a different apartment than the default one set in
Settings → ErpHome:

`[erphome_widget apt="dom-nad-morzem"]`

The same attribute is available on the Gutenberg block and the sidebar
widget.

== External services ==

This plugin embeds the booking widget as an `<iframe>` loaded directly from
the **erphome.pl** domain (specifically, your account's subdomain,
`your-name.erphome.pl`), operated by ERP HOME Sp. z o.o.

This happens on every page where you embed the widget (shortcode, block, or
sidebar widget), each time a visitor loads that page: the visitor's browser
connects directly to erphome.pl to fetch the apartment's current
availability calendar. The plugin itself does not send any data from your
site to erphome.pl server-side — the only connection is made by the
visitor's browser when it loads the iframe content.

erphome.pl's data-processing terms (including the visitor's IP address and
browser data, which any HTTP request sends by default):
[erphome.pl Privacy Policy](https://erphome.pl/polityka-prywatnosci) (Polish
only, as the service itself is Polish-only).

== Installation ==

1. Install and activate the plugin.
2. Go to Settings → ErpHome.
3. Paste the "Widget preview" link copied from your erphome.pl panel
   (Settings → Calendars) and save — the account/apartment slug fields fill
   in automatically.
4. Add `[erphome_widget]` to a post or page, or insert the "ErpHome —
   Booking Widget" block in the editor.

== Frequently Asked Questions ==

= Do I need an erphome.pl account? =

Yes. The plugin displays the widget from an existing account — it does not
create a new one or replace the erphome.pl panel.

= Does this work with my Airbnb or Booking.com calendar? =

Yes, if your erphome.pl account already syncs availability from those
platforms via iCal. The widget always shows the same availability as your
erphome.pl booking page — sync is configured once, in your erphome.pl
account, not in WordPress.

= Does this slow down my site? =

The widget loads in a separate `<iframe>` with `loading="lazy"` — it does
not block the rest of the page from rendering.

= I have several apartments — can I embed more than one? =

Yes, use the `apt` attribute on the shortcode, block, or widget to pick a
different apartment than the plugin's default on each page.

= Where do I find the link to paste into Settings → ErpHome? =

In the erphome.pl panel: Settings → Calendars → "Widget rezerwacji na Twoją
stronę" section.

== Screenshots ==

1. Plugin settings screen (Settings → ErpHome).
2. The "ErpHome — Booking Widget" block in the editor, with live preview.

== Changelog ==

= 1.0.0 =
* Initial release: shortcode, Gutenberg block, sidebar widget, settings page with automatic link recognition.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
