Version 1.0.0 or later
After installing and activating the plugin you have to generate VAPID Keys. They are used to authorize Subscribers, and without them, the integration will not work.
Click the link in admin notification or head over to Settings -> Carriers -> Push.
Next, press Generate button and Save changes.
By default pop-up asking for permission to receive Push Notifications will be shown after clicking the "Subscribe" button (Manual mode). You can change it to show a pop-up to Users immediately after the first click on the page (Automatic mode).
To gain more control over subscriptions you can check the option, that only logged-in users can subscribe to receive Push Notifications. This mode is recommended if you want to send more personal Notifications, e.g. about changing order status.
You can display the "Subscribe" button on any of your pages using
[notification-push-subscribe-button]Shortcode. You can customize it with several attributes:
id- set the id attribute to the button
class- set the additional classes to the button
label- set the text of the button
granted_label- set the text of the button if permission is already granted
denied_label- set the text of button if permission was revoked
You can also use the following code to display the button from PHP:
The "Subscribe" button is available to be used in both Manual and Automatic mode.
There is no way to determine who is the subscriber if a subscription is not connected with the user. This situation can happen if the
Subscribing by logged-in Usersoption is not checked. In this case, the site administrator cannot remove every user subscription on their demand. Fortunately, users can revoke permission by themselves:
You can see user subscriptions on the user list in the admin dashboard.
In the user edit view, you can see details about its subscriptions, or remove any of them separately.
There are two plugin-specific recipients
This Recipient will try to send Notification to every subscriber, no matter if they are connected with a specific user or not.
This Recipient will try to send Notification to every browser in which the given user subscribed for receiving notifications. The list shows users which are subscribed at least once.