Plugin Directory

Changeset 3008158


Ignore:
Timestamp:
12/11/2023 02:07:47 PM (2 years ago)
Author:
eshipper
Message:

v2.16.6-beta

Location:
eshipper-commerce/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • eshipper-commerce/trunk/framework/plugin.php

    r3007319 r3008158  
    238238    public function eshipper_upgrades($upgraderObject, $options)
    239239    {
    240         wc_get_logger()->debug('Plugin version updated to ' . ESHIPPER_VERSION . '. Now executing Post-Update tasks.', ['source' => 'eshipper']);
     240        wc_get_logger()->debug('[upgrader_process_complete]', ['source' => 'eshipper']);
    241241
    242242        $eshipperPluginPathName = plugin_basename(ESHIPPER_PLUGIN_FILE);
     
    247247            in_array($eshipperPluginPathName, $options['plugins'])
    248248        ) {
    249             // Set a transient to record that our plugin has just been updated
    250             set_transient('wp_eshipper_updated', 1);
     249            // Now we know that eshipper plugin was updated, so let's do things we're supposed to on updates
     250            $this->runPostUpdateTasks();
    251251        } else {
    252252            wc_get_logger()->error('Post-Update process interrupted.', ['source' => 'eshipper']);
    253 
    254             return;
    255         }
    256 
    257         // Now we know that eshipper plugin was updated, so let's do things we're supposed to on updates
     253        }
     254    }
     255
     256    public function runPostUpdateTasks()
     257    {
     258        wc_get_logger()->debug('Plugin version updated to ' . ESHIPPER_VERSION . '. Now executing Post-Update tasks.', ['source' => 'eshipper']);
     259
     260        // Set transient for update
     261        set_transient('wp_eshipper_updated', 1);
     262
     263        // Update the version number in options table
     264        wc_get_logger()->debug('Updating eshipper version in options table.', ['source' => 'eshipper']);
     265        update_option('eshipper_version', ESHIPPER_VERSION);
    258266
    259267        // If the plugin is deactivated, activate it again
     
    272280        require_once(ESHIPPER_PLUGIN_PATH . '/plugin/pluginLifeCycle.php');
    273281        pluginLifeCycle::updateDB();
    274 
    275         // Update the version number in options table
    276         wc_get_logger()->debug('Updating eshipper version in options table.', ['source' => 'eshipper']);
    277         update_option('eshipper_version', ESHIPPER_VERSION);
    278282
    279283        // DONE
     
    365369        $version = get_option('eshipper_version', '1.0');
    366370        if (version_compare($version, ESHIPPER_VERSION, '<')) {
    367             update_option('eshipper_version', ESHIPPER_VERSION);
     371            $this->runPostUpdateTasks();
    368372        }
    369373    }
  • eshipper-commerce/trunk/readme.txt

    r3007319 r3008158  
    55Tested up to: 6.3.1
    66Requires PHP: 7.1
    7 Stable tag: 2.16.5
     7Stable tag: 2.16.6
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    5454
    5555== Changelog ==
     56= 2.16.6 =
     57* Improved update process
     58
    5659= 2.16.5 =
    5760* Improved update process
     
    105108
    106109== Upgrade Notice ==
     110= 2.16.6 =
     111Improved update process
     112
    107113= 2.16.5 =
    108114Improved update process
  • eshipper-commerce/trunk/woocommerce-eshipper.php

    r3007319 r3008158  
    44    Plugin URI: https://ww2.eshipper.com/ecommerce/
    55    Description: Extends WooCommerce with Shipping Rates from eShipper
    6     Version: 2.16.5
     6    Version: 2.16.6
    77    Author: eShipper
    88    Author URI: https://ww2.eshipper.com/
     
    2828    get_site_option('active_sitewide_plugins')
    2929))) {
    30     define('ESHIPPER_VERSION', '2.16.5');
     30    define('ESHIPPER_VERSION', '2.16.6');
    3131    define('ESHIPPER_PLUGIN_PATH', dirname(__FILE__));
    3232    define('ESHIPPER_PLUGIN_FILE', __FILE__);
Note: See TracChangeset for help on using the changeset viewer.