Plugin Directory

Changeset 3144112


Ignore:
Timestamp:
08/30/2024 07:39:47 AM (19 months ago)
Author:
OptiMonk
Message:

Update plugin to 2.0.9

Location:
exit-intent-popups-by-optimonk
Files:
25 added
3 edited

Legend:

Unmodified
Added
Removed
  • exit-intent-popups-by-optimonk/trunk/optimonk-admin.php

    r2939844 r3144112  
    4545    public static function activate()
    4646    {
     47        OptiMonkAdmin::install();
    4748        add_option('optiMonkDoActivationRedirect', true);
     49    }
     50
     51    public static function install()
     52    {
     53        try {
     54            OptiMonkAdmin::sendAction('install');
     55        } catch (Exception $e) {
     56            error_log('Error during plugin activation tracking: ' . $e->getMessage());
     57        }
     58    }
     59
     60    public static function uninstall()
     61    {
     62        try {
     63            OptiMonkAdmin::sendAction('uninstall');
     64        } catch (Exception $e) {
     65            error_log('Error during plugin uninstallation tracking: ' . $e->getMessage());
     66        }
     67    }
     68
     69    private static function sendAction($type)
     70    {
     71        try {
     72            $data = array(
     73                'type' => $type,
     74                'domain' => get_site_url(),
     75                'timestamp' => gmdate('Y-m-d\TH:i:s\Z')
     76            );
     77            $args = array(
     78                'body' => wp_json_encode($data),
     79                'headers' => array('Content-Type' => 'application/json'),
     80                'timeout' => 1,
     81                'blocking' => false
     82            );
     83
     84            wp_remote_post("https://backend.optimonk.com/app/wordpress/track?token=yNGfPlqxPQD97FbZ6URy01d0n", $args);
     85        } catch (Exception $e) {
     86            error_log('Error sending tracking data: ' . $e->getMessage());
     87        }
    4888    }
    4989
  • exit-intent-popups-by-optimonk/trunk/optimonk.php

    r3134681 r3144112  
    55  Description: OptiMonk, the conversion optimization toolset crafted for marketers
    66  Author: OptiMonk
    7   Version: 2.0.8
     7  Version: 2.0.9
    88  Text Domain: optimonk
    99  Domain Path: /languages
     
    3737
    3838    register_activation_hook(__FILE__, array('OptiMonkAdmin', 'activate'));
     39    register_uninstall_hook(__FILE__, array('OptiMonkAdmin', 'uninstall'));
    3940    add_action('admin_init', array('OptiMonkAdmin', 'redirectToSettingPage'));
    4041    add_action('admin_init', array('OptiMonkAdmin', 'initFeedbackNotification'));
  • exit-intent-popups-by-optimonk/trunk/readme.txt

    r3134681 r3144112  
    44Requires at least: 2.8.0
    55Tested up to: 6.6.1
    6 Stable tag: 2.0.8
     6Stable tag: 2.0.9
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.