PluginProbe
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services / 5.4.2
WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services v5.4.2
8.7.7 8.7.6 8.7.5 8.7.4 8.7.3 8.7.2 8.7.1 8.7.0 8.6.9 8.6.8 8.6.7 8.6.6 8.6.5 8.6.4 8.6.2 8.6.1 8.6.0 8.5.9 8.5.8 8.5.7 8.5.6 8.5.5 8.5.4 8.5.3 8.5.2 All 533 releases
chatbot / includes / openai / plugin-upgrader / admin / admin-notices.php

admin-notices.php in WPBot – AI ChatBot for Live Support, Lead Generation, WordPress Automation, AI Services 5.4.2, at includes/openai/plugin-upgrader/admin/admin-notices.php

56 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3
4 add_action('admin_notices', 'qcld_openaiaddon__invalid_license_notice');
5 function qcld_openaiaddon__invalid_license_notice(){
6 if( (get_openaiaddon_licensing_buy_from() != '') && (get_openaiaddon_invalid_license()) ){
7 if( (get_openaiaddon_licensing_buy_from() == 'quantumcloud') && (get_openaiaddon_licensing_key() == '') ){
8
9 }elseif( (get_openaiaddon_licensing_buy_from() == 'codecanyon') && (get_openaiaddon_envato_key() == '') ){
10
11 }else{
12 $class="notice notice-error is-dismissible qc-notice-error";
13 $message = "You have Entered an Invalid License Key for Livechat Addon";
14 $logo_src = openaiaddon_LICENSING_URL.'/images/qc-logo.jpg';
15
16 printf( '<div data-dismiss-type="qc-invalid-license" class="%1$s"><a href="'.esc_url('https://www.quantumcloud.com/products/').'" target="_blank"><img src="'.$logo_src.'" /></a><p>%2$s</p></div>', esc_attr( $class ), $message );
17 }
18 }
19 }
20
21
22 if( !get_openaiaddon_enter_license_notice_dismiss_transient() ){
23 add_action('admin_notices', 'qcld_openaiaddon_license_enter_notice');
24 function qcld_openaiaddon_license_enter_notice(){
25 if( (get_openaiaddon_licensing_buy_from() != false) || (get_openaiaddon_invalid_license() != 1) ){
26
27 }else{
28 $class="notice notice-error is-dismissible qc-notice-error";
29
30
31 $message = "Hi! Please enter the license key to receive automatic updates and premium support. <a href=".openaiaddon__get_licensing_url().">Please activate your copy of Open AI Addon.</a>";
32 $logo_src = openaiaddon_LICENSING_URL.'/images/qc-logo.jpg';
33 printf( '<div data-dismiss-type="qc-enter-license" class="%1$s"><a href="'.esc_url('https://www.quantumcloud.com/products/').'" target="_blank"><img src="'.$logo_src.'" /></a><p>%2$s</p></div>', esc_attr( $class ), $message );
34 }
35 }
36 }
37
38 //start new-update-for-codecanyon
39 function openaiaddon__licensing_notice_dismiss_func(){
40 check_ajax_referer('openaiaddon__licensing_admin_nonce', 'nonce');
41
42 if( sanitize_text_field($_GET['dismiss_notice']) == 'qc-enter-license' ){
43 if( !get_openaiaddon_enter_license_notice_dismiss_transient() ){
44 set_openaiaddon_enter_license_notice_dismiss_transient();
45 }
46 }
47
48 if( sanitize_text_field($_GET['dismiss_notice']) == 'qc-invalid-license' ){
49 if( !get_openaiaddon_invalid_license_notice_dismiss_transient() ){
50 set_openaiaddon_invalid_license_notice_dismiss_transient();
51 }
52 }
53
54 }
55 add_action('wp_ajax_openaiaddon__licensing_notice_dismiss', 'openaiaddon__licensing_notice_dismiss_func');
56 //end new-update-for-codecanyon