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
← All changes | includes/openai/plugin-upgrader/utils.php +50 -50 8.6.65.4.2 View file →
@@ -1,51 +1,51 @@
1 -<?php
2 -if (!defined('ABSPATH')) exit; // Exit if accessed directly
3 -function qcld_openaiaddon_activate_au()
4 -{
5 - $plugin_slug = openaiaddon_LICENSING_PLUGIN_SLUG;
6 - $get_plugin_data = get_openaiaddon_licensing_plugin_data();
7 -
8 - $plugin_current_version = $get_plugin_data['Version'];
9 - $plugin_remote_path = openaiaddon_LICENSING_PLUGIN_NAME;
10 - $license_key = get_openaiaddon_licensing_key();
11 - $buy_from = get_openaiaddon_licensing_buy_from();
12 -
13 - if( $buy_from == 'quantumcloud' ){
14 - $upgrader_instance = new qcld_openaiaddon_AutoUpdate ( $plugin_current_version, $plugin_remote_path, $plugin_slug, '', $license_key );
15 - }
16 -}
17 -add_action( 'init', 'qcld_openaiaddon_activate_au' );
18 -
19 -
20 -function qcld_openaiaddon_upgrade_completed( $upgrader_object, $options ) {
21 - // The path to our plugin's main file
22 - $plugin_slug = openaiaddon_LICENSING_PLUGIN_SLUG;
23 - // If an update has taken place and the updated type is plugins and the plugins element exists
24 - if( $options['action'] == 'update' && $options['type'] == 'plugin' && isset( $options['plugins'] ) ) {
25 - // Iterate through the plugins being updated and check if ours is there
26 - foreach( $options['plugins'] as $plugin ) {
27 - if( $plugin == $plugin_slug ) {
28 - deleteqc_openaiaddon_update_transient();
29 - deleteqc_openaiaddon_renew_transient();
30 - }
31 - }
32 - }
33 -}
34 -add_action( 'upgrader_process_complete', 'qcld_openaiaddon_upgrade_completed', 10, 2 );
35 -
36 -add_action('admin_enqueue_scripts', 'qcld_openaiaddon_licensing_scripts');
37 -
38 -function qcld_openaiaddon_licensing_scripts(){
39 - wp_enqueue_style('qcld_openaiaddon_licensing_style', plugin_dir_url( __FILE__ ).'/assets/css/style.css');
40 -
41 - //start new-update-for-codecanyon
42 - wp_enqueue_script('qcld_openaiaddon_licensing_script', plugin_dir_url( __FILE__ ).'/assets/js/script.js', array('jquery'), false, true );
43 -
44 - wp_localize_script( 'qcld_openaiaddon_licensing_script', 'wplivechat_licensing_admin_ajax', array(
45 -
46 - 'ajax_url' => admin_url( 'admin-ajax.php' ),
47 - 'nonce' => wp_create_nonce( "wplivechat_licensing_admin_nonce" )
48 - )
49 - );
50 - //end new-update-for-codecanyon
1 +<?php
2 +
3 +function qcld_openaiaddon_activate_au()
4 +{
5 + $plugin_slug = openaiaddon_LICENSING_PLUGIN_SLUG;
6 + $get_plugin_data = get_openaiaddon_licensing_plugin_data();
7 +
8 + $plugin_current_version = $get_plugin_data['Version'];
9 + $plugin_remote_path = openaiaddon_LICENSING_PLUGIN_NAME;
10 + $license_key = get_openaiaddon_licensing_key();
11 + $buy_from = get_openaiaddon_licensing_buy_from();
12 +
13 + if( $buy_from == 'quantumcloud' ){
14 + $upgrader_instance = new qcld_openaiaddon_AutoUpdate ( $plugin_current_version, $plugin_remote_path, $plugin_slug, '', $license_key );
15 + }
16 +}
17 +add_action( 'init', 'qcld_openaiaddon_activate_au' );
18 +
19 +
20 +function qcld_openaiaddon_upgrade_completed( $upgrader_object, $options ) {
21 + // The path to our plugin's main file
22 + $plugin_slug = openaiaddon_LICENSING_PLUGIN_SLUG;
23 + // If an update has taken place and the updated type is plugins and the plugins element exists
24 + if( $options['action'] == 'update' && $options['type'] == 'plugin' && isset( $options['plugins'] ) ) {
25 + // Iterate through the plugins being updated and check if ours is there
26 + foreach( $options['plugins'] as $plugin ) {
27 + if( $plugin == $plugin_slug ) {
28 + deleteqc_openaiaddon_update_transient();
29 + deleteqc_openaiaddon_renew_transient();
30 + }
31 + }
32 + }
33 +}
34 +add_action( 'upgrader_process_complete', 'qcld_openaiaddon_upgrade_completed', 10, 2 );
35 +
36 +add_action('admin_enqueue_scripts', 'qcld_openaiaddon_licensing_scripts');
37 +
38 +function qcld_openaiaddon_licensing_scripts(){
39 + wp_enqueue_style('qcld_openaiaddon_licensing_style', plugin_dir_url( __FILE__ ).'/assets/css/style.css');
40 +
41 + //start new-update-for-codecanyon
42 + wp_enqueue_script('qcld_openaiaddon_licensing_script', plugin_dir_url( __FILE__ ).'/assets/js/script.js', array('jquery'), false, true );
43 +
44 + wp_localize_script( 'qcld_openaiaddon_licensing_script', 'wplivechat_licensing_admin_ajax', array(
45 +
46 + 'ajax_url' => admin_url( 'admin-ajax.php' ),
47 + 'nonce' => wp_create_nonce( "wplivechat_licensing_admin_nonce" )
48 + )
49 + );
50 + //end new-update-for-codecanyon
51 51 }