PluginProbe
AI Chatbot for WooCommerce & Live Chat – onWebChat / 3.10.0
AI Chatbot for WooCommerce & Live Chat – onWebChat v3.10.0
3.10.0 3.9.2 3.9.3 3.9.1 3.9.0 3.8.4 3.8.2 3.8.1 3.8.0 3.7.2 3.7.1 3.7.0 3.6.0 3.5.5 trunk 1.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.2 1.0.3 1.0.4 1.0.5 All 49 releases
← All changes | admin/tabs/chat.php +19 -1 3.5.53.10.0 View file →
@@ -74,8 +74,24 @@
74 74 Example: <code>index price contact.php blog/</code>
75 75 </p>
76 76 </td>
77 77 </tr>
78 +
79 + <tr>
80 + <th scope="row">
81 + <label for="logged-only">Signed-in Users Only</label>
82 + </th>
83 + <td>
84 + <label>
85 + <input id="logged-only" name="logged-only" type="checkbox" value="1"
86 + <?php checked(get_option('onwebchat_plugin_option_logged_only', 0), 1); ?> />
87 + Show the chat widget only to signed-in (logged-in) users
88 + </label>
89 + <p class="description">
90 + When enabled, visitors who are not logged in to your website will not see the chat widget at all.
91 + </p>
92 + </td>
93 + </tr>
78 94 </table>
79 95
80 96 <p class="submit">
81 97 <input type="submit" class="button button-primary" value="Save Chat Settings">
@@ -126,10 +142,12 @@
126 142
127 143 $pagesSelect = isset($_POST["pages-select"]) ? absint($_POST["pages-select"]) : 1;
128 144 $showOnPages = isset($_POST["showonpages"]) ? sanitize_text_field($_POST["showonpages"]) : '';
129 145 $hideOnPages = isset($_POST["hideonpages"]) ? sanitize_text_field($_POST["hideonpages"]) : '';
130 -
146 + $loggedOnly = isset($_POST["logged-only"]) ? 1 : 0; // unchecked checkboxes are not posted (default: off)
147 +
131 148 update_option('onwebchat_plugin_option_pages_select', $pagesSelect);
149 + update_option('onwebchat_plugin_option_logged_only', $loggedOnly);
132 150
133 151 if ($pagesSelect == 2) {
134 152 update_option('onwebchat_plugin_option_show_pages', $showOnPages);
135 153 } else if ($pagesSelect == 3) {