Plugin Directory

Changeset 2352334


Ignore:
Timestamp:
08/04/2020 10:59:27 AM (6 years ago)
Author:
enviosimple
Message:

Update to version 1.0.4

Location:
enviosimple/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • enviosimple/trunk/enviosimple.php

    r2294164 r2352334  
    55 * Description: EnvioSimple WooCommerce integration extension
    66 * Tags: email, woocommerce, integration
    7  * Version: 1.0.3
     7 * Version: 1.0.4
    88 * Author: EnvioSimple
    9  * Author URI: https://profiles.wordpress.org/enviosimple/
     9 * Author URI: https://enviosimple.com
    1010 * Requires at least: 4.7
    11  * Tested up to: 5.2.2
     11 * Tested up to: 5.4.2
    1212 * WC requires at least: 2.6.14
    13  * WC tested up to: 3.6.5
     13 * WC tested up to: 4.3.1
    1414 *
    1515 * Text Domain: enviosimple
     
    3030    class EnvioSimple {
    3131        const MODULE = 'enviosimple_module';
    32         const MODULE_VERSION = '1.0.3';
     32        const MODULE_VERSION = '1.0.4';
    3333        const INSTANCE_ID = 'faeb1c18-d277-4c2a-bcbe-42d2953e55e1';
    3434        const WEB_HOOK_URL_DOMAIN = 'api.itembase.com';
     
    8383            }
    8484        }
     85       
     86        public static function uninstallAndCleanUp()
     87        {
     88            global $wpdb;
     89            $api_credentials = self::get_api_credentials();
     90
     91            if ( empty( $api_credentials ) ) {
     92                return;
     93            }
     94           
     95            $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'woocommerce_api_keys WHERE consumer_key = %s', wc_api_hash(self::get_consumer_key())));
     96            self::revokeKey( $api_credentials );
     97        }
    8598
    8699        /**
     
    381394    register_activation_hook( __FILE__, array( 'EnvioSimple', 'activate' ) );
    382395    add_action( 'admin_init', array( 'EnvioSimple', 'isRevokeKeyRequest' ) );
     396    register_uninstall_hook(__FILE__, array( 'EnvioSimple', 'uninstallAndCleanUp' ));
    383397
    384398endif;
  • enviosimple/trunk/readme.txt

    r2294268 r2352334  
    1 === WooCommerce EnvioSimple Integration ===
     1    === WooCommerce EnvioSimple Integration ===
    22Contributors: EnvioSimple
    33Tags: woocommerce, integration
    44Requires at least: 4.7
    5 Tested up to: 5.2.2
    6 Stable tag: 1.0.3
     5Tested up to: 5.4.2
     6Stable tag: 1.0.4
    77Requires PHP: 5.6
    88WC requires at least: 3.0
    9 WC tested up to: 3.7
     9WC tested up to: 4.3.1
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7070== Changelog ==
    7171
     72= 1.0.4 =
     73
     74* Added advanced cleanup functionality upon deletion of extension
     75
    7276= 1.0.3 =
    7377
Note: See TracChangeset for help on using the changeset viewer.