Plugin Directory

Changeset 3359752


Ignore:
Timestamp:
09/11/2025 10:31:48 AM (7 months ago)
Author:
provesource
Message:

Re-add hooks to avoid errors with plugin state

Location:
provesource
Files:
22 added
2 edited

Legend:

Unmodified
Added
Removed
  • provesource/trunk/provesrc.php

    r3359745 r3359752  
    88 * Plugin Name: ProveSource
    99 * Description: ProveSource is a social proof marketing platform that works with your Wordpress and WooCommerce websites out of the box
    10  * Version: 3.0.11
     10 * Version: 3.0.12
    1111 * Author: ProveSource LTD
    1212 * Author URI: https://provesrc.com
     
    3232    public static function version()
    3333    {
    34         return '3.0.11';
     34        return '3.0.12';
    3535    }
    3636
     
    9292add_action('woocommerce_payment_complete', 'provesrc_woocommerce_hook_handler', 999, 1);
    9393
     94register_uninstall_hook(__FILE__, 'provesrc_uninstall_hook');
     95register_activation_hook(__FILE__, 'provesrc_activation_hook');
     96register_deactivation_hook(__FILE__, 'provesrc_deactivation_hook');
    9497add_action('update_option_' . PSConstants::option_api_key(), 'provesrc_api_key_updated', 999, 0);
    9598add_action('add_option_' . PSConstants::option_api_key(), 'provesrc_api_key_updated', 999, 0);
     
    217220    } catch (Exception $err) {
    218221        provesrc_handle_error('failed to process order', $err, ['orderId' => $id]);
     222    }
     223}
     224
     225function provesrc_uninstall_hook()
     226{
     227    if (!current_user_can('activate_plugins')) {
     228        return;
     229    }
     230    $apiKey = provesrc_get_api_key();
     231    if (!$apiKey) {
     232        return;
     233    }
     234}
     235
     236function provesrc_activation_hook()
     237{
     238    if (!current_user_can('activate_plugins')) {
     239        return;
     240    }
     241    $apiKey = provesrc_get_api_key();
     242    if (!$apiKey) {
     243        return;
     244    }
     245}
     246
     247function provesrc_deactivation_hook()
     248{
     249    if (!current_user_can('activate_plugins')) {
     250        return;
     251    }
     252    $apiKey = provesrc_get_api_key();
     253    if (!$apiKey) {
     254        return;
    219255    }
    220256}
  • provesource/trunk/readme.txt

    r3359745 r3359752  
    66Requires at least: 3.1.0
    77Tested up to: 6.8
    8 Stable tag: 3.0.11
     8Stable tag: 3.0.12
    99License: GPL-3.0-or-later
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
Note: See TracChangeset for help on using the changeset viewer.