PluginProbe
WANotifier for Forms and Actions / 2.4.5
WANotifier for Forms and Actions v2.4.5
3.1.1 3.1.0 3.0.4 2.7.10 2.7.11 2.7.12 2.7.13 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 3.0.0 3.0.1 3.0.2 3.0.3 trunk 0.1.0 0.1.1 1.0.0 1.0.1 1.0.2 All 67 releases
← All changes | views/admin-dashboard.php +91 -83 1.0.32.4.5 View file →
@@ -8,23 +8,62 @@
8 8 if ( ! defined( 'ABSPATH' ) ) {
9 9 exit;
10 10 }
11 11 $api_key = get_option(NOTIFIER_PREFIX . 'api_key');
12 -$activated = get_option(NOTIFIER_PREFIX . 'api_activated');
13 12 ?>
14 13 <div class="wrap notifier">
15 14 <div class="notifier-wrapper">
16 - <?php if ('' == $activated) : ?>
17 - <div class="onboarding">
18 - <div class="onboarding-body">
19 - <h3>Enter your WANotifier.com API Key</h3>
20 - <p>You can find your <b>WANotifier.com API key</b> on your <a href="https://app.wanotifier.com/settings/api/" target="_blank">Settings</a> page. If you do not have an account yet you can create one for FREE at <a href="https://wanotifier.com/" target="_blank">WANotifier.com</a>.</p>
21 - <form method="POST" action="" enctype="multipart/form-data">
22 - <input type="text" name="notifier_api_key" id="wa-notifier-api-key" placeholder="Enter your API key here" value="<?php echo $api_key; ?>" />
23 - <button name="webhook_validation" class="button-primary" type="submit" value="">Submit and validate</button>
24 - <?php wp_nonce_field( NOTIFIER_NAME . '-webhook-validation' ); ?>
25 - </form>
15 + <?php if (!Notifier::is_api_active()) : ?>
16 + <div class="dashboard-boxes">
17 + <div class="col w-70">
18 + <div class="dashboard-box">
19 + <div class="dashboard-box-head">
20 + <h3>Let's get started 🚀</h3>
21 + </div>
22 + <div class="dashboard-box-body">
23 + <p><a href="https://wanotifier.com/" target="_blank">WANotifier</a> is a free SaaS tool that allows you to send bulk WhatsApp marketing and transactional messages to your customers using the <b>WhatsApp's official Cloud APIs</b>.</p>
24 + <p>This plugin is an <b>extension to our SaaS platform</b> that allows you to <b>trigger WhatsApp message notifications</b> from your WordPress website. To use this plugin you'll need to <b>create an account with us</b> and connect it with this plugin.</p>
25 + <p>Following are the instructions to do the setup.</p>
26 + <ol>
27 + <li>Create a <b>FREE</b> <a href="https://app.wanotifier.com/create-account/" target="_blank">WANotifier</a> account.</li>
28 + <li>Go through the on-boarding steps to setup your phone number with our tool and <b>WhatsApp Cloud APIs</b>.</li>
29 + <li>After setup is done, you'll land on the <b>Dashboard</b> page. From there, go to the <a href="https://app.wanotifier.com/settings/api/" target="_blank">Settings > API</a> page and scroll to the bottom to get your <b>WANotifier.com API Key</b>.</li>
30 + <li>Copy and paste that key in the text box below and click on <b>Save and Validate</b> to continue.</li>
31 + </ol>
32 + <hr>
33 + <p><b>Need help?</b> Just <a href="https://wanotifier.com/support/" target="_blank">get in touch</a> with us and we'll help you setup your account and this plugin for FREE.</p>
34 + <hr style="margin-bottom: 20px;">
35 + <form method="POST" action="" enctype="multipart/form-data">
36 + <input type="text" name="notifier_api_key" id="wa-notifier-api-key" placeholder="Enter your API key here" value="<?php echo $api_key; ?>" />
37 + <button name="webhook_validation" class="button-primary" type="submit" value="">Submit and validate</button>
38 + <?php wp_nonce_field( NOTIFIER_NAME . '-webhook-validation' ); ?>
39 + </form>
40 + </div>
41 + </div>
26 42 </div>
43 + <div class="col w-30">
44 + <div class="dashboard-box">
45 + <div class="dashboard-box-head">
46 + <h3>Customer testimonials ❤️</h3>
47 + </div>
48 + <div class="dashboard-box-body">
49 + ⭐⭐⭐⭐⭐
50 + <em><p>I have been <strong>using WANotifier for the past 1 month</strong> for my eCommerce store. I am able to add/import/manage contacts, create message templates, segment users, connect with third party APIs, reply to messages all within the same dashboard. The UI is <strong>simple and friendly</strong>. The instructions are clear. <strong>Definitely recommended</strong>!</p></em>
51 + <p><strong>Gopi Kanna</strong><br>
52 + Co-founder, DomainCoasters.com</p>
53 + <hr>
54 + ⭐⭐⭐⭐⭐
55 + <em><p>We have been using WANotifier for past two months. <strong>Nice product</strong>! A quick and automated response brings in a feeling of completeness to online purchase experience for our customers. We have processed multiple orders after installing this utility and <strong>it just works perfectly every time</strong>.</p></em>
56 + <p><strong>Avinash Pendse</strong>
57 + <br>Founder, GrahakShahi.com</p>
58 + <hr>
59 + ⭐⭐⭐⭐⭐
60 + <em><p>Very good plugin for <b>WhatsApp Woocommerce integration for free</b>. Easily work without any issues. Simple to use.Tutorials also found on YouTube. Thanks to the WANotifier team.</p></em>
61 + <strong>hashimsamnan</strong>
62 + <br>Woocommerce user
63 + </div>
64 + </div>
65 + </div>
27 66 </div>
28 67 <?php
29 68 else :
30 69 $available_triggers = Notifier_Notification_Triggers::get_notification_triggers();
@@ -30,72 +69,40 @@
30 69 $available_triggers = Notifier_Notification_Triggers::get_notification_triggers();
31 70 $enabled_triggers = get_option('notifier_enabled_triggers');
32 71 $enabled_triggers = (!empty($enabled_triggers)) ? $enabled_triggers : array();
33 72 ?>
34 - <form class="dashboard-boxes" method="POST" action="" enctype="multipart/form-data">
73 + <div class="dashboard-boxes">
35 74 <div class="col w-70">
36 75 <div class="dashboard-box">
37 76 <div class="dashboard-box-head">
38 - <h3>Available Triggers</h3>
77 + <h3>How to use this plugin? 🤔</h3>
39 78 </div>
40 - <div class="dashboard-box-body">
41 - <?php
42 - foreach($available_triggers as $group_name => $group_triggers) {
43 - ?>
44 - <div class="notifier-triggers-group-wrap">
45 - <h3><?php echo $group_name; ?></h3>
46 - <?php
47 - foreach($group_triggers as $trigger){
48 - $merge_tags = Notifier_Notification_Merge_Tags::get_trigger_merge_tags($trigger['id']);
49 - $recipient_fields = Notifier_Notification_Triggers::get_trigger_recipient_fields($trigger['id']);
50 - ?>
51 - <div class="notifier-trigger-wrap">
52 - <label for="notifier_trigger_<?php echo $trigger['id']; ?>" class="notifier-trigger-label d-flex align-items-center">
53 - <input type="checkbox" name="notifier_triggers[]" class="enable-trigger" value="<?php echo $trigger['id']; ?>" <?php checked(in_array($trigger['id'], $enabled_triggers)); ?>>
54 - <?php echo $trigger['label'] ?>
55 - <button class="notifier-show-trigger-info ms-auto"><span class="dashicons dashicons-info-outline"></span></button>
56 - </label>
57 - <div class="notifier-trigger-info hide">
58 - <table>
59 - <tr>
60 - <th>Trigger description:</th>
61 - <td><?php echo $trigger['description'] ?></td>
62 - </tr>
63 - <tr>
64 - <th>Available data fields:</th>
65 - <td>
66 - <?php foreach($merge_tags as $tag_group_name => $group_tags): ?>
67 - <b><?php echo $tag_group_name; ?>: </b>
68 - <?php echo implode(', ', $group_tags); ?><br />
69 - <?php endforeach; ?>
70 - </td>
71 - </tr>
72 - <tr>
73 - <th>Available recipient fields:</th>
74 - <td>
75 - <?php
76 - if(!empty($recipient_fields)){
77 - foreach($recipient_fields as $recipient_group_name => $recipient_group_fields):
78 - echo '<b>' . $recipient_group_name . ': </b>';
79 - echo implode(', ', $recipient_group_fields);
80 - endforeach;
81 - }
82 - else{
83 - echo 'No fields';
84 - }
85 - ?>
86 - </td>
87 - </tr>
88 - </table>
89 - </div>
90 - </div>
91 - <?php
92 - }
93 - ?>
94 - </div>
95 - <?php
96 - }
97 - ?>
79 + <div class="dashboard-box-body how-to">
80 + <img class="notifier-overview-image" src="<?php echo NOTIFIER_URL; ?>assets/images/notifier-plugin-overview.svg">
81 + <p>Follow the instructions below to setup your <b>Triggers</b> that'll fire WhatsApp notification messages:</p>
82 + <p><b>STEP 1 - Create a Trigger on this site</b></p>
83 + <ul>
84 + <li><a href="<?php echo admin_url('post-new.php?post_type=wa_notifier_trigger'); ?>" target="_blank">Click here</a> to add a new Trigger.</li>
85 + <li>Select a <b>Trigger</b> from the dropdown when you want the notification to be fired.</li>
86 + <li>Enable the <b>Data fields</b> and <b>Recipient fields</b> that you want to send to WANotifier when notification is fired.</li>
87 + <li>Then save this trigger and <b>Enable</b> it.</li>
88 + </ul>
89 + <p><b>STEP 2 - Create a Message Template on WANotifier</b></p>
90 + <ul>
91 + <li>Now go to the WANotifier portal and <a href="https://app.wanotifier.com/templates/add/" target="_blank">create a new Message Template</a>. </li>
92 + <li>You can either keep the template simple or add variable placeholders like <code>{{1}}</code>, <code>{{2}}</code> and so on. We will map these variables with <b>Data fields</b> in the next step below.</li>
93 + </ul>
94 + <p><b>STEP 3 - Create a Notification on WANotifier</b></p>
95 + <ul>
96 + <li>Now <a href="https://app.wanotifier.com/notifications/add/" target="_blank">create a new Notification</a> and select <b>Notification Type</b> as <b>Transactional</b>.</li>
97 + <li>Then from the <b>Trigger</b> dropdown, select the trigger that you created in Step 1.</li>
98 + <li>Add <b>Recipients</b> to whom you want to send this notification. Select the <b>Recipient fields</b> that you enabled above or select custom contacts.</li>
99 + <li>Select the <b>Message Template</b> you created in Step 2.</li>
100 + <li>If you created this message template with variables (<code>{{1}}</code>, <code>{{2}}</code> and so on), you will see option to map these variables with the <b>Data fields</b> you enabled during Step 1.</li>
101 + <li>Click on the <b>Save</b> button to save this notification.</li>
102 + </ul>
103 + <p>That's it. Your notification will be sent each time it gets triggered from this website!</p>
104 + <p><em><b>Disclaimer:</b> By enabling the triggers you accept and agree that the associated data and recipient fields will be sent to our server for use with the message template when sending notifications. We do not store any data other than what is required for sending a notification.</em></p>
98 105 </div>
99 106 </div>
100 107 </div>
101 108 <div class="col w-30">
@@ -100,30 +107,31 @@
100 107 </div>
101 108 <div class="col w-30">
102 109 <div class="dashboard-box">
103 110 <div class="dashboard-box-head">
104 - <h3>Actions</h3>
111 + <h3>Want more control? 💪</h3>
105 112 </div>
106 - <div class="dashboard-box-footer">
107 - <div class="dashboard-box-buttons-wrap">
108 - <button name="notifier_save_triggers" class="button-primary" type="submit" value="">Save</button>
109 - <?php wp_nonce_field( NOTIFIER_NAME . '-save-triggers' ); ?>
110 - </div>
113 + <div class="dashboard-box-body">
114 + <p>This plugin provides you with simple triggers with a basic set of data fields to trigger notifications. If want more control over triggering your notifications, we suggest using <b>Webhooks</b> instead.</p>
115 + <p>With webhooks you can <b>add Contacts</b> and <b>trigger Notifications</b> from WordPress using action hooks or using 3rd party sites like Zapier, Pabbly, IFTTT etc!</p>
116 + <p><a href="https://app.wanotifier.com/contacts/import/" target="_blank">Click here</a> to view the webhook URL to <b>add contacts</b>. To trigger notification using webhook, <a href="https://app.wanotifier.com/notifications/add/" target="_blank">create a new Notification</a> and select <b>Trigger</b> option as <b>Via a Webhook URL</b>.</p>
111 117 </div>
112 118 </div>
113 119 <div class="dashboard-box">
114 120 <div class="dashboard-box-head">
115 - <h3>How to?</h3>
121 + <h3>Quick links 🔗</h3>
116 122 </div>
117 123 <div class="dashboard-box-body">
118 - <p>On this page, you'll find all the available triggers on this website that you can use to trigger a notification from your <a href="https://wanotifier.com/" target="_blank">WANotifier.com</a> account.</p>
119 - <p>The triggers you <b>enable and save</b> here will be available to use on your account when you create a <a href="https://app.wanotifier.com/notifications/add/">new Notification</a>.</p>
120 - <p>Currently we only support the shown <b>WordPress</b> and <b>Woocommerce</b> triggers. If you want more triggers, your can request us <a href="https://wanotifier.com/support/">here</a> or contact your developer to add custom triggers using our filter hooks.</p>
121 - <p><em><b>Disclaimer:</b> By enabling the triggers you accept and agree that the associated data and recipient fields will be sent to our server for use with the message template when sending notifications. We do not store any data other than what is required for sending a notification.</em></p>
124 + <ul>
125 + <li><a href="https://app.wanotifier.com/template/" target="_blank">Message Templates</a> - Create / edit message templates.</li>
126 + <li><a href="https://app.wanotifier.com/contacts/" target="_blank">Contacts</a> - Manage your contacts.</li>
127 + <li><a href="https://app.wanotifier.com/notifications/" target="_blank">Notifications</a> - See the notification delivery stats and much more.</li>
128 + <li><a href="https://app.wanotifier.com/inbox/" target="_blank">Inbox</a> - See customer replies to your notifications and message them back.</li>
129 + </ul>
122 130 </div>
123 131 </div>
124 132 </div>
125 - </form>
133 + </div>
126 134 <?php endif; ?>
127 135
128 136 </div>
129 137 </div>