Important Note: This Addon will only work if the ARMember plugin is installed with version 5.5.1 or higher
It will allow you to send WhatsApp notifications to users and admin for various events using the ARMember membership plugin.
Steps For Installation And Activation
You can install the plugin in the following two ways. And ARMember – WhatsApp Notification Addon requires ARMember Plugin installed and active.
New installation via FTP
- Download the plugin and extract it. You will find a directory armemberwhatsapp.
- In your WordPress installation directory, upload armemberwhatsapp to
wp-content/plugins/
- Activate the
ARMember - WhatsApp Notification Addon
plugin through thePlugins
menu from the WordPress admin panel.
New installation via the WordPress Uploader
- Download the plugin.
- Log in to your WordPress admin panel
- Go to
Plugins
->Add New
->Upload
- Click on “choose file” and browse the download package. When the plugin uploads successfully, click on
Activate Plugin
.
Steps to Set up WhatsApp Notification Addon For Your Website
Let’s setup ARMember – WhatsApp Notification for your website :
-
After activating the addon, WhatsApp Notification section will be displayed in
ARMember
->General Settings
->WhatsApp Notification
section.Please see below screen,
-
To start sending WhatsApp Notifications to users, you have to select a predefined configured WhatsApp gateway from the list.
Below are the predefined WhatsApp notification Gateway:
- Twilio
Parameters: SID
Account SID Token
Auth Token From
From Number 2.Whatsapp Business(Facebook Business)
Parameters: from
Phone Number ID whatsapp_business_id
Business Account ID token
Permenent Access Token
Twilio Configuration
If you do not have a Twilio account, then create one from here.
You can find your Account SID
and Auth Token
from Twilio
-> Account
, under the API Keys & Credentials
section, click on API keys & Tokens
and you will find Account SID
and Auth Token
under the Auth Tokens
section from this page.
Please see below screen,
How to Get and Add a Phone Number for sending notifications?
After signing up and creating an account, you may get your WhatsApp number for sending notifications by following the below steps:
From the left side panel, under the Develop
section, navigate and click on #Phone Number
-> Manage
-> Buy a number
and from here you can purchase the number according to your requirements.
After purchasing the phone number for sending messages, you can view and copy your active numbers from Phone Number
-> Manage
-> Active numbers
.
Content Template builder for Twilio
Now we will have to create a template for your WhatsApp message which will be then shared with your users. To create a template please follow the below instructions:
- Navigate to
Develop
->Messaging
->Content Template builder
- The Template Dashboard is where you can view all the templates you’ve created, along with their status.
Please keep in mind that templates only WhatsApp business initiated in green only will work properly. This indicates that it follows the updated guidelines, if it is in red then your message/template wont be forwarded..
Click on the
Create New button
to start crafting a new template.Enter your desired template name and select the template language.
For Content Type, ensure you select
Text
only, then click Save.
A textbox will appear where you can type the content of your message.
Enter your message and click on
+ Add Variable
wherever you wish to insert a placeholder from ARMember.
Note:It is advisable to not end your content with a Variable as this may increase the chances of your template being rejected as it doesn’t meet the updated Facebook Policy.
Submitting for WhatsApp ApprovalAfter entering your content and variables, click on
save and submit for WhatsApp Approval
not just save.A pop-up will appear; where you have to enter your Samples of variables. After the samples are entered Save with Samples.
After that make sure to select
Utility
under the category, notMarketing
. Also, keep theAllow WhatsApp to recategorize this template
checkbox checked to increase the chances of approval.Click on submit to complete the process.
WhatsApp Business (Facebook Business) Configuration
Several steps need to be followed to utilize WhatsApp Business as your WhatsApp Message Gateway. It’s essential to note that these steps adhere to the official Facebook Meta guidelines for creating templates for your WhatsApp Integration. These templates are designated for notifications exclusively; they cannot be utilized for direct client communication afterward.
Getting StartedFirstly, Visit Facebook for Developers to access the platform for app development and integration.</p
In the upper right corner, click on
Log In
and use your existing Facebook account credentials to log into the Facebook Developer platform.Follow the registration process, agreeing to Facebook’s Terms and Developer Policies. This typically involves agreeing to terms of service and providing necessary personal or company information.
Verify your account either by adding a valid phone number (you’ll receive a verification code via SMS) or by adding a credit card to your account.
After that is done you will be asked to verify your email as well.
Once the email is verified you can move to the next step which is the last step it is advisable that you select
Developer
but that totally depends on you it can be selected as per your liking.
Within your Facebook Developer account, navigate to the dashboard or app creation section and click on
Create App
.Choose the app type as
Other
.- Moving further in the next step you’ll be asked to choose an app type. Select the
Business
app type regardless of whether you’re an individual or an enterprise and hit next to move to the next step. Here, enter your basic information such as the display name of your app. You can change this later if needed. Other details like the email associated with your account are automatically populated.
Once all that is done simply click on Create App. Here it will ask you to enter your password again please ensure to type in the correct password for the same.
The app creation process is now complete, and the next step involves adding a product to the app, specifically WhatsApp. To proceed, navigate to the bottom of the page and locate the
WhatsApp
card. Click onSet up
located in the lower right corner of the card to initiate the setup process.As soon as you click on Set up you will be greeted with the following screen which provides details on what’s encompassed within the Business Platform API. By proceeding, you are consenting to the Facebook Terms for WhatsApp Business and the Meta Hosting Terms for Cloud API. Simply click on
Continue
to move forward with the process.A quickstart section will show up where you have to click on
Start Using the API
button to move forward and your App Creation part is done.
Facebook imposes restrictions on the usage of certain terms, such as WhatsApp
. Specifically, developers are prohibited from incorporating Meta’s trademarks or brand elements, which include terms like FB, Face, Book, Insta, Gram, and Rift, or any terms that may be confusingly similar to them, within their app names. This restriction applies to any term that could be perceived as referencing Facebook or its affiliated brands.
Now on your Dashboard you can see that WhatsApp has been added as a Product and you are redirected to the Getting Started section which has been populated with multiple things such as a Temporary Access Token, Phone Number ID, WhatsApp Business Account ID, and a code for sending messages. Please keep in mind that even though we got the Phone Number ID and WhatsApp Business Account ID, we need Permanent Access Token and not the Temporary one as it will expire within 24 hours.
If you wish you can test if you have been successful so far by clicking on sending Test message but prior to that you will have to List To number
. You can add upto 5 numbers for test messages. Note that WhatsApp will send a confirmation code to verify each phone number. You can skip the steps 3, 4 and directly click on add numbers to move ahead where you will have to provide your business information such as name, email, country, and website. After that verify your business phone number for WhatsApp messaging and then you will find that your To field is populated with the newly added number you can click on Send Message
and you will receive a message for the same.
Generating Permanent Access Token For Whatsapp Business (Facebook Business) API
This is a crucial part we are going to create a permanent access token that will never expire.
Navigate to the Business Settings Page within your Facebook Developer account or you can simply click the link here.
Here under the User section click on System Users. Where we will create an admin user and enable full control for the app.
This will be initially blank, simply click on
Add user
.Upon proceeding, you will encounter Facebook’s Non-discrimination policy, which you are required to review and accept. After carefully reviewing the policy within the modal, click on
I accept
located in the bottom right corner of the pop-up to confirm your acceptanceOn the following screen, you’ll encounter a
Thank you
message from Facebook. Simply click onDone
located in the bottom right corner to proceed with creating a new user.Enter the desired username and select the role
Admin
. Upon completion, click onCreate system user
to finalize the processYou may be prompted once again with Facebook’s Non-discrimination policy, which requires your review and acceptance.
After accepting the policy, you will see the newly created Admin user. In the right section of the screen, proceed by clicking on the “Add Assets” button.
In the pop-up that appears, navigate to
Apps
and select the app previously created for WhatsApp integration. Enable the Full Control (Manage App) slider, and then click onSave Changes
to confirm.The next pop-up will notify you that a new asset has been added. Simply click on
Done
to proceed.Simply click on generate token and make sure the correct app is selected.
Set the Token Expiration to Never because we want a permanent one.
- Afterward, once you confirm everything click on Generate token button to Generate the Permanent Token.
Congratulations you have created your Permanent Token and simply place the Phone Number ID and WhatsApp Business Account ID, and the newly generated Permanent Access Token please ensure that it is Permanent Token and not Temporary Token. Paste the same in
ARMember
->General Settings
->Whatsapp Notification
.
Once the main part of getting credentials for WhatsApp business, we can head over to create Templates/Messages for your WhatsApp Notification in ARMember.
To start with Navigate to WhatsApp Manager within your Facebook Developer account by clicking on the Three lines on the top and it will list shortcuts simply choose WhatsApp Manager.
In the
Overview
section that appears next, locate the three dots on the right of the WhatsApp account you previously created. Click on these dots, and then selectManage message templates
from the dropdown menu.On the following page, you can create new templates as well as view your existing templates that will be utilized in ARMember WhatsApp Notifications.
To get started, click on
Create Template
in the top right corner.When setting up a template, make sure the category is set to
Utility
.Next, provide a name for the template (you can use the same names seen in ARMember, such as On Purchase Plan”, “On Password Change”, etc.) and select the language used in ARMember.
Once configured, click
Continue
in the top right corner to proceed.Now a template is created.
Here place your content inside the body only. Please make sure to keep header as none and don’t add a footer or a button aswell. As this message is for a notification only.
Inside the body enter your message and click on
+ Add Variable
wherever you wish to insert a placeholder from ARMember. They will be denoted by a variable {{1}} and so on as you keep adding the variables the number inside them will increase.After you are done configuring the body make sure to fill up the sample content such as what would take the variables place. Please keep in mind this is a sample only so it is easier for them to review your content.
Once you are done simply click on Submit Button present on the top right.
Upon creation, each template undergoes a review process by WhatsApp, which typically takes about an hour for approval. An approved template will showcase a green status, indicating it’s
Active - Quality pending
. Meanwhile, a template under review will appear gray with the statusIn review
, as illustrated in the screenshot below :
Make sure to select your WordPress Default Langauge as it is currently not possible to use Multi-language add-on to configure your WhatsApp message in other languages as well.
Note: It is advisable to not end your content with a Variable as this may increase the chances of your template being rejected as it doesn’t meet the updated Facebook Policy.
Whatsapp Addon Settings configuration
-
After selecting WhatsApp gateway you have to select Mobile Number Field. If your registration form don’t have mobile number field than please create that from
ARMember
->Manage Forms
->Registration/Sign up forms.
Important Note:If your form don’t have Mobile Number field than this addon will not work.
-
“Send WhatsApp Notification Field” label. It allows to set checkbox label which will be displayed below mobile number field in plan purchase form.
Please below screen,
ARMember will send WhatsApp Notification when “Send WhatsApp Notification Field” is checked.
Members can also enable or disable receving WhatsApp notification from Edit Profile form. By setting “Send WhatsApp Notification Field”.
-
Select Default Country Code either Fixed or Dynamic. If you choose “Dynamic” then the “country” field must exist in your signup form and it’s meta key must be “country”.
Please see below screen,
-
You can check WhatsApp gateway configuration is correct or not by using Send Test WhatsApp.
Important Note:Mobile number must be start with country code.
-
Enable Debug Mode, enable it to write notification status into a log file.
-
Enable “Notification on User sign up” to send notification when user sign up at your site.
You need to select a template which is done from twilio or whatsapp Business.
You need to set a parameters data if you have added variables in twilio or whatsapp business message templates.
-
Enable “Notification on purchase membership plan” to send a notification when the user purchases any Membership plan.
Enter message content which will be used to send to user as message content.
-
Enable “Notification on Password Change” to notify user when their account’s password is changed.
Enter message content which will be used to send to user as message content.
-
Enable “Cancel Membership Plan” to notify user when their membership plan is canceled by the admin or user.
Enter message content which will be used to send to user as message content.
-
Enable “Before Expire Membership Plan” to notify user when their membership plan will going to expire.
Enter message content which will be used to send to user as message content.
-
Enable “Before Recurring Payments due (auto & manual payment)” to notify users when their Recurring payment will going to expire.
Enter message content which will be used to send to user as message content.
-
Enable “Send WhatsApp notification to Admin?” to send all above enabled notifications to admin also when any of the events are executed from them.
Enter the admin mobile number on which all notifications will be executed.
Important Note:Mobile number must be start with country code.
Click Save Button. Now All is Set.