Push notification (WooCommerce)
This documentation provides step-by-step instructions for configuring and using your WordPress site's WebToNative Push Notification feature.
Last updated
This documentation provides step-by-step instructions for configuring and using your WordPress site's WebToNative Push Notification feature.
Last updated
Navigate to WebToNative Settings > Push Notification in the WordPress admin dashboard.
Enable the "Enable Push Notification" checkbox to activate push notifications
Fill in the required fields:
OneSignal App ID: Enter your OneSignal application ID.
REST API Key: Enter the REST API key for your OneSignal account.
In the Customize Messages section:
Provide a custom message for each WooCommerce order status (e.g., "Processing," "Completed").
These messages will be sent to users as notifications when their order status changes.
Click Save Changes to apply the configuration.
Push notifications are automatically triggered when a WooCommerce order status changes.
The system:
Fetches the order details and user information.
Hashes the user ID with a secret key to generate an externalUserId.
Sends the custom message for the new order status via the OneSignal API.
Dynamic External User ID: Ensures secure identification of users via hashed externalUserId.
Customizable Notifications: Allows custom messages for different WooCommerce order statuses.
Automatic WooCommerce Event Handling: Triggers notifications on order status changes.
Notifications Not Sending?
Ensure push notifications are enabled in the settings.
Verify the OneSignal App ID and REST API Key.
Check that the wton_notification_key is properly set.
Frontend Integration Issues?
Confirm the WTN.OneSignal object is available in the app environment.
Check the browser console for errors related to the script.