WPRentals can send push notifications to phones and computers when a user gets a message, a booking request, a booking confirmation, a cancellation or an invoice. The alerts are sent through OneSignal, an external service.
What you need
- A site that runs on HTTPS.
- A OneSignal account. At the time of writing, the free plan covers these alerts. Check the OneSignal pricing page for current limits.
- The OneSignal WordPress plugin. It asks your visitors for permission and shows the alerts.
Step 1: Create the OneSignal app
- Log in to OneSignal and create an app for Web. Choose WordPress as the type.
- Type your site address, including https, and save.
- Turn on a permission prompt or the subscription bell, so visitors can allow alerts.
- Open Settings > API keys and IDs. Copy the App ID.
- Create an App API key and copy it. OneSignal shows it only once. Keep it secret.
Step 2: Set up the OneSignal plugin
- In WordPress go to Plugins > Add New, search for OneSignal, then install and activate OneSignal – Web Push Notifications.
- Open OneSignal in the left menu, paste the App ID and save.
The plugin’s own REST API Key field is only for alerts the plugin sends by itself, for example when you publish a post. The WPRentals alerts do not use it.
Step 3: Turn on push notifications in WPRentals
Go to WPRentals Theme Options > Push Notifications.

- Set Enable push notifications to yes.
- Paste the OneSignal App ID. It must be the same App ID as in the OneSignal plugin.
- Paste the OneSignal App API Key.
- Click Save Changes.
If the App ID or the key is empty, no alerts are sent.

Step 4: Edit the alert texts
Each event has its own text. Leave a text blank to stop that alert.

| Event | Who gets it | Page it opens |
|---|---|---|
| New message | The person who receives the message | Inbox |
| New booking request | Owner | Bookings |
| Booking confirmed | Guest | Reservations |
| Booking confirmed, with or without deposit | Owner | Bookings |
| Booking request rejected | Guest | Reservations |
| Booking request cancelled | Owner | Bookings |
| Confirmed booking cancelled | Guest | Reservations |
| New invoice | Guest | Reservations |
You can use these words in a text. WPRentals replaces them when it sends the alert:
- %website_name – the site name
- %website_url – the site address
- %username – the username of the person who gets the alert
- %user_email – the email of the person who gets the alert
Alerts can show on a locked screen, so they do not include the content of the message.
What your users do
- Log in to your site.
- Click the bell or the prompt and choose Allow.
On iPhone and iPad, users need iOS or iPadOS 16.4 or newer. They must first add the site to the Home Screen, open it from there, and then allow notifications. The site also needs a web app manifest; see the OneSignal guide for web push on iOS.
After a user logs out, the next page opened in that browser disconnects them from alerts on that device.
If an alert does not arrive
- Check that the App ID is the same in the OneSignal plugin and in Theme Options.
- Check the API key. A wrong key shows no error on your site.
- Check that the event’s text is not blank.
- Check that the user was logged in and clicked Allow. After allowing, reload the page once.
- Check that notifications are on for the browser in the phone or computer settings, and that Do Not Disturb is off.
