Plugin Directory

Changeset 2921995


Ignore:
Timestamp:
06/05/2023 10:31:10 PM (3 years ago)
Author:
eshipper
Message:

Version 2.15.1 - Important Bug Fixes for version 2.15 (Re)

Location:
eshipper-commerce
Files:
1 edited
33 copied

Legend:

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

    r2921969 r2921995  
    5050
    5151        // Load Localisation
    52         add_action('plugins_loaded', [&$this, 'load_localisation']);
     52        add_action('plugins_loaded', [&$this, 'eshipper_upgrades']);
    5353
    5454        // Checkout order details
     
    189189            wp_enqueue_script('eshipper-require-postalcode', plugins_url('lib/require-postalcode.js', ESHIPPER_PLUGIN_FILE), ['jquery'], '1.0', true);
    190190            echo '<div id="calc_shipping_postcode_required" class="hidden woocommerce-info" style="display:none">' . __(
    191                 'Zip / Postal Code is required to calculate shipping',
    192                 'woocommerce-eshipper'
    193             ) . '</div>';
     191                    'Zip / Postal Code is required to calculate shipping',
     192                    'woocommerce-eshipper'
     193                ) . '</div>';
    194194        }
    195195
     
    228228            require_once(ESHIPPER_PLUGIN_PATH . '/models/woocommerce_eshipper_update.php');
    229229//            $update = new woocommerce_eshipper_update( '', ESHIPPER_PLUGIN_FILE, array('version' => ESHIPPER_VERSION, 'upgrade_url'=>'', 'product'=>'eshipper'));
     230        }
     231    }
     232
     233    public function eshipper_upgrades()
     234    {
     235        $this->load_localisation();
     236
     237        // DB upgrade for version 2.15.1
     238        $version = get_option('eshipper_version', '1.0');
     239        if (version_compare($version, ESHIPPER_VERSION_2_15, '<')) {
     240            $db = new woocommerce_eshipper_db();
     241            // Setup / Run Update.
     242            $db->updateDB();
    230243        }
    231244    }
     
    244257            $db->setup();
    245258        }
    246 
    247         $version = get_option('eshipper_version', '1.0');
    248         if (version_compare($version, ESHIPPER_VERSION_2_15, '<')) {
    249             $db = new woocommerce_eshipper_db();
    250             // Setup / Run Update.
    251             $db->updateDB();
    252         }
    253259    }
    254260
  • eshipper-commerce/trunk/framework/plugin.php

    r2921969 r2921995  
    5050
    5151        // Load Localisation
    52         add_action('plugins_loaded', [&$this, 'load_localisation']);
     52        add_action('plugins_loaded', [&$this, 'eshipper_upgrades']);
    5353
    5454        // Checkout order details
     
    189189            wp_enqueue_script('eshipper-require-postalcode', plugins_url('lib/require-postalcode.js', ESHIPPER_PLUGIN_FILE), ['jquery'], '1.0', true);
    190190            echo '<div id="calc_shipping_postcode_required" class="hidden woocommerce-info" style="display:none">' . __(
    191                 'Zip / Postal Code is required to calculate shipping',
    192                 'woocommerce-eshipper'
    193             ) . '</div>';
     191                    'Zip / Postal Code is required to calculate shipping',
     192                    'woocommerce-eshipper'
     193                ) . '</div>';
    194194        }
    195195
     
    228228            require_once(ESHIPPER_PLUGIN_PATH . '/models/woocommerce_eshipper_update.php');
    229229//            $update = new woocommerce_eshipper_update( '', ESHIPPER_PLUGIN_FILE, array('version' => ESHIPPER_VERSION, 'upgrade_url'=>'', 'product'=>'eshipper'));
     230        }
     231    }
     232
     233    public function eshipper_upgrades()
     234    {
     235        $this->load_localisation();
     236
     237        // DB upgrade for version 2.15.1
     238        $version = get_option('eshipper_version', '1.0');
     239        if (version_compare($version, ESHIPPER_VERSION_2_15, '<')) {
     240            $db = new woocommerce_eshipper_db();
     241            // Setup / Run Update.
     242            $db->updateDB();
    230243        }
    231244    }
     
    244257            $db->setup();
    245258        }
    246 
    247         $version = get_option('eshipper_version', '1.0');
    248         if (version_compare($version, ESHIPPER_VERSION_2_15, '<')) {
    249             $db = new woocommerce_eshipper_db();
    250             // Setup / Run Update.
    251             $db->updateDB();
    252         }
    253259    }
    254260
Note: See TracChangeset for help on using the changeset viewer.