WPRentals Theme Documentation WPRentals Theme Documentation

  • Client Support
  • Video Tutorials
  • WPRentals
  • WPEstate
  • API
Home / WP Rentals Theme Options / Theme Options – Push Notifications (OneSignal)

Theme Options – Push Notifications (OneSignal)

10 views

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

  1. Log in to OneSignal and create an app for Web. Choose WordPress as the type.
  2. Type your site address, including https, and save.
  3. Turn on a permission prompt or the subscription bell, so visitors can allow alerts.
  4. Open Settings > API keys and IDs. Copy the App ID.
  5. Create an App API key and copy it. OneSignal shows it only once. Keep it secret.

Step 2: Set up the OneSignal plugin

  1. In WordPress go to Plugins > Add New, search for OneSignal, then install and activate OneSignal – Web Push Notifications.
  2. 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.

The OneSignal plugin settings page with the App ID field outlined

Step 3: Turn on push notifications in WPRentals

Go to WPRentals Theme Options > Push Notifications.

WPRentals Theme Options with the Push Notifications menu item outlined

  1. Set Enable push notifications to yes.
  2. Paste the OneSignal App ID. It must be the same App ID as in the OneSignal plugin.
  3. Paste the OneSignal App API Key.
  4. Click Save Changes.

If the App ID or the key is empty, no alerts are sent.

The enable switch, OneSignal App ID and OneSignal App API Key fields outlined

Step 4: Edit the alert texts

Each event has its own text. Leave a text blank to stop that alert.

The alert texts, with the new message and new booking request fields outlined

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

  1. Log in to your site.
  2. 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.
WP Rentals Theme Options

Related Articles

  • Similar Listings on the property page
  • How to Format Prices: Decimals, Separators and the Currency Symbol Space
  • How to Show the Footer on Half Map Layouts
  • What Is the WPESTATE FAN Option

HELP CATEGORIES

  • 71. General
  • 72. Installation & Basic Setup
  • 383. How Booking Works
  • 18Advanced Search
  • 18Elementor WPRentals Studio
  • 14Email Notifications
  • 29FAQ
  • 14Installation FAQ
  • 10Menu Options
  • 33Owner & Renter
  • 8Page Templates
  • 25Property / Listing
  • 22Shortcodes
  • 4Supported Maps
  • 100Technical how to
  • 5Third Party plugins
  • 4Translation & Multi Languages
  • 3WordPress Blog Post
  • 13WordPress Widgets
  • 12WP Rentals Payments
  • 84WP Rentals Theme Options
  • 26WPML & Weglot

Join Us On

Powered by WP Estate - All Rights Reserved
  • Client Support
  • Video Tutorials
  • WPRentals
  • WPEstate
  • API