Plugin Directory

Changeset 3454074


Ignore:
Timestamp:
02/04/2026 08:12:21 PM (7 weeks ago)
Author:
IQComputing
Message:

Update to version 1.2.3 from GitHub

Location:
live-rates-for-shipstation
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • live-rates-for-shipstation/tags/1.2.3/changelog.txt

    r3453976 r3454074  
    22
    33This is a brief text document keeping track of changes to the plugin. For a full history, see the Github Repository.
     4
     5= 1.2.3 =
     6
     7Relase Date: February 04, 2026.
     8
     9* Overview
     10    * Patches issue of a misnamed method call.
     11        * Thanks to user @centuryperf for reporting this issue!
     12        * Future unit tests will harden against this kind of error.
     13    * Patches issue where warehouses would be called multiple times a request.
     14        * When there were no ShipStation warehouses, the API would retry. This now checks against the transient FALSE first, then attempts an API call.
     15        * This unfortunately means possibly storing an empty transient, weighing the options this seems acceptable.
    416
    517= 1.2.2 =
  • live-rates-for-shipstation/tags/1.2.3/core/api/shipstation.php

    r3452263 r3454074  
    351351        $warehouses = get_transient( $trans_key );
    352352
    353         if( empty( $warehouses ) || $this->skip_cache ) {
    354 
     353        if( false === $warehouses || $this->skip_cache ) {
     354
     355            $warehouses = array();
    355356            $body = $this->make_request( 'get', 'warehouses' );
    356357
     
    361362
    362363            // Return Early - No Warehouses to work with.
    363             if( empty( $body['warehouses'] ) ) {
    364                 return array();
    365             }
    366 
    367             // We do need most the Warehouse data, but not all.
    368             $warehouses = array();
    369             foreach( $body['warehouses'] as $warehouse_data ) {
    370 
    371                 $warehouse = array_intersect_key( $warehouse_data, array_flip( array(
    372                     'warehouse_id',
    373                     'is_default',
    374                     'name',
    375                     'origin_address',
    376                     'return_address',
    377                 ) ) );
    378 
    379                 if( $warehouse['is_default'] ) {
    380                     $warehouse['name'] .= ' (' . esc_html__( 'ShipStation Default', 'live-rates-for-shipstation' ) . ')';
     364            if( ! empty( $body['warehouses'] ) ) {
     365
     366                // We do need most the Warehouse data, but not all.
     367                foreach( $body['warehouses'] as $warehouse_data ) {
     368
     369                    $warehouse = array_intersect_key( $warehouse_data, array_flip( array(
     370                        'warehouse_id',
     371                        'is_default',
     372                        'name',
     373                        'origin_address',
     374                        'return_address',
     375                    ) ) );
     376
     377                    if( $warehouse['is_default'] ) {
     378                        $warehouse['name'] .= ' (' . esc_html__( 'ShipStation Default', 'live-rates-for-shipstation' ) . ')';
     379                    }
     380
     381                    $warehouses[ $warehouse['warehouse_id'] ] = $warehouse;
     382
    381383                }
    382 
    383                 $warehouses[ $warehouse['warehouse_id'] ] = $warehouse;
    384 
    385384            }
    386385
    387386            // Cache Warehouse data.
    388             if( ! empty( $warehouses ) ) {
    389                 set_transient( $trans_key, $warehouses, $this->cache_time );
    390             }
    391         }
    392 
    393         return $warehouses;
     387            set_transient( $trans_key, $warehouses, $this->cache_time );
     388           
     389        }
     390
     391        return ( ! empty( $warehouses ) ) ? $warehouses : array();
    394392
    395393    }
  • live-rates-for-shipstation/tags/1.2.3/core/classes/shipping-calculator.php

    r3453976 r3454074  
    654654            }
    655655
    656             $dimensions['running']['weight'] = $dimensions['running']['weight'] + ( floatval( $request['weight'] ) * $this->get_cartitem_value( $key, 'quantity', 1 ) );
    657             $dimensions['running']['height'] = $dimensions['running']['height'] + ( floatval( $product->get_height() ) * $this->get_cartitem_value( $key, 'quantity', 1 ) );
     656            $dimensions['running']['weight'] = $dimensions['running']['weight'] + ( floatval( $request['weight'] ) * $this->get_cartitem_val( $key, 'quantity', 1 ) );
     657            $dimensions['running']['height'] = $dimensions['running']['height'] + ( floatval( $product->get_height() ) * $this->get_cartitem_val( $key, 'quantity', 1 ) );
    658658            $dimensions['largest'] = array(
    659659                'length'    => ( $dimensions['largest']['length'] < $product->get_length() ) ? $product->get_length() : $dimensions['largest']['length'],
     
    12621262    public function get_products() {
    12631263        if( empty( $this->cart ) ) return array();
    1264         return array_column( $this->cart, 'data' );
     1264        return array_combine( array_keys( $this->cart ), array_column( $this->cart, 'data' ) );
    12651265    }
    12661266
  • live-rates-for-shipstation/tags/1.2.3/live-rates-for-shipstation.php

    r3453976 r3454074  
    44 * Plugin URI: https://iqcomputing.com/contact/
    55 * Description: ShipStation shipping method with live rates.
    6  * Version: 1.2.2
     6 * Version: 1.2.3
    77 * Requires at least: 6.2
    88 * Author: IQComputing
     
    2626     * @var String
    2727     */
    28     protected static $version = '1.2.2';
     28    protected static $version = '1.2.3';
    2929
    3030
  • live-rates-for-shipstation/tags/1.2.3/readme.txt

    r3453976 r3454074  
    44Requires at least: 5.9
    55Tested up to: 6.8
    6 Stable tag: 1.2.2
     6Stable tag: 1.2.3
    77License: GPLv3 or later
    88License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    5151== Changelog ==
    5252
     53= 1.2.3 (2026-02-04) =
     54* Patches issue of misnamed method call. (Thanks @centuryperf)!
     55* Patches issue where warehouses would be called multiple times a request.
     56
    5357= 1.2.2 (2026-02-04) =
    5458* Replaces PHP 8.5 func array_first with reset. (Thanks Theo)!
     
    5660= 1.2.1 (2026-02-02) =
    5761* Patches an issue with adjustments not adjusting. (Thanks @nextphase)!
    58 
    59 = 1.2.0 (2026-02-02) =
    60 * Adds Warehouse Support (Global and Zone based).
    61 * Adds ShipStation Packages into Custom Packages on a Shipping Zone.
    62 * Moves shipping calculations into a dedicated class with filer hook to override.
    63 * New `iqlrss/cache/shipstation` filter hook.
    64 * New `iqlrss/cache/shipstation_expires` filter hook.
    65 * New `iqlrss/cache/cart_rates` filter hook.
    66 * New `iqlrss/shipping/calculator_object` filter hook.
  • live-rates-for-shipstation/trunk/changelog.txt

    r3453976 r3454074  
    22
    33This is a brief text document keeping track of changes to the plugin. For a full history, see the Github Repository.
     4
     5= 1.2.3 =
     6
     7Relase Date: February 04, 2026.
     8
     9* Overview
     10    * Patches issue of a misnamed method call.
     11        * Thanks to user @centuryperf for reporting this issue!
     12        * Future unit tests will harden against this kind of error.
     13    * Patches issue where warehouses would be called multiple times a request.
     14        * When there were no ShipStation warehouses, the API would retry. This now checks against the transient FALSE first, then attempts an API call.
     15        * This unfortunately means possibly storing an empty transient, weighing the options this seems acceptable.
    416
    517= 1.2.2 =
  • live-rates-for-shipstation/trunk/core/api/shipstation.php

    r3452263 r3454074  
    351351        $warehouses = get_transient( $trans_key );
    352352
    353         if( empty( $warehouses ) || $this->skip_cache ) {
    354 
     353        if( false === $warehouses || $this->skip_cache ) {
     354
     355            $warehouses = array();
    355356            $body = $this->make_request( 'get', 'warehouses' );
    356357
     
    361362
    362363            // Return Early - No Warehouses to work with.
    363             if( empty( $body['warehouses'] ) ) {
    364                 return array();
    365             }
    366 
    367             // We do need most the Warehouse data, but not all.
    368             $warehouses = array();
    369             foreach( $body['warehouses'] as $warehouse_data ) {
    370 
    371                 $warehouse = array_intersect_key( $warehouse_data, array_flip( array(
    372                     'warehouse_id',
    373                     'is_default',
    374                     'name',
    375                     'origin_address',
    376                     'return_address',
    377                 ) ) );
    378 
    379                 if( $warehouse['is_default'] ) {
    380                     $warehouse['name'] .= ' (' . esc_html__( 'ShipStation Default', 'live-rates-for-shipstation' ) . ')';
     364            if( ! empty( $body['warehouses'] ) ) {
     365
     366                // We do need most the Warehouse data, but not all.
     367                foreach( $body['warehouses'] as $warehouse_data ) {
     368
     369                    $warehouse = array_intersect_key( $warehouse_data, array_flip( array(
     370                        'warehouse_id',
     371                        'is_default',
     372                        'name',
     373                        'origin_address',
     374                        'return_address',
     375                    ) ) );
     376
     377                    if( $warehouse['is_default'] ) {
     378                        $warehouse['name'] .= ' (' . esc_html__( 'ShipStation Default', 'live-rates-for-shipstation' ) . ')';
     379                    }
     380
     381                    $warehouses[ $warehouse['warehouse_id'] ] = $warehouse;
     382
    381383                }
    382 
    383                 $warehouses[ $warehouse['warehouse_id'] ] = $warehouse;
    384 
    385384            }
    386385
    387386            // Cache Warehouse data.
    388             if( ! empty( $warehouses ) ) {
    389                 set_transient( $trans_key, $warehouses, $this->cache_time );
    390             }
    391         }
    392 
    393         return $warehouses;
     387            set_transient( $trans_key, $warehouses, $this->cache_time );
     388           
     389        }
     390
     391        return ( ! empty( $warehouses ) ) ? $warehouses : array();
    394392
    395393    }
  • live-rates-for-shipstation/trunk/core/classes/shipping-calculator.php

    r3453976 r3454074  
    654654            }
    655655
    656             $dimensions['running']['weight'] = $dimensions['running']['weight'] + ( floatval( $request['weight'] ) * $this->get_cartitem_value( $key, 'quantity', 1 ) );
    657             $dimensions['running']['height'] = $dimensions['running']['height'] + ( floatval( $product->get_height() ) * $this->get_cartitem_value( $key, 'quantity', 1 ) );
     656            $dimensions['running']['weight'] = $dimensions['running']['weight'] + ( floatval( $request['weight'] ) * $this->get_cartitem_val( $key, 'quantity', 1 ) );
     657            $dimensions['running']['height'] = $dimensions['running']['height'] + ( floatval( $product->get_height() ) * $this->get_cartitem_val( $key, 'quantity', 1 ) );
    658658            $dimensions['largest'] = array(
    659659                'length'    => ( $dimensions['largest']['length'] < $product->get_length() ) ? $product->get_length() : $dimensions['largest']['length'],
     
    12621262    public function get_products() {
    12631263        if( empty( $this->cart ) ) return array();
    1264         return array_column( $this->cart, 'data' );
     1264        return array_combine( array_keys( $this->cart ), array_column( $this->cart, 'data' ) );
    12651265    }
    12661266
  • live-rates-for-shipstation/trunk/live-rates-for-shipstation.php

    r3453976 r3454074  
    44 * Plugin URI: https://iqcomputing.com/contact/
    55 * Description: ShipStation shipping method with live rates.
    6  * Version: 1.2.2
     6 * Version: 1.2.3
    77 * Requires at least: 6.2
    88 * Author: IQComputing
     
    2626     * @var String
    2727     */
    28     protected static $version = '1.2.2';
     28    protected static $version = '1.2.3';
    2929
    3030
  • live-rates-for-shipstation/trunk/readme.txt

    r3453976 r3454074  
    44Requires at least: 5.9
    55Tested up to: 6.8
    6 Stable tag: 1.2.2
     6Stable tag: 1.2.3
    77License: GPLv3 or later
    88License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    5151== Changelog ==
    5252
     53= 1.2.3 (2026-02-04) =
     54* Patches issue of misnamed method call. (Thanks @centuryperf)!
     55* Patches issue where warehouses would be called multiple times a request.
     56
    5357= 1.2.2 (2026-02-04) =
    5458* Replaces PHP 8.5 func array_first with reset. (Thanks Theo)!
     
    5660= 1.2.1 (2026-02-02) =
    5761* Patches an issue with adjustments not adjusting. (Thanks @nextphase)!
    58 
    59 = 1.2.0 (2026-02-02) =
    60 * Adds Warehouse Support (Global and Zone based).
    61 * Adds ShipStation Packages into Custom Packages on a Shipping Zone.
    62 * Moves shipping calculations into a dedicated class with filer hook to override.
    63 * New `iqlrss/cache/shipstation` filter hook.
    64 * New `iqlrss/cache/shipstation_expires` filter hook.
    65 * New `iqlrss/cache/cart_rates` filter hook.
    66 * New `iqlrss/shipping/calculator_object` filter hook.
Note: See TracChangeset for help on using the changeset viewer.