Changeset 3454074
- Timestamp:
- 02/04/2026 08:12:21 PM (7 weeks ago)
- Location:
- live-rates-for-shipstation
- Files:
-
- 10 edited
- 1 copied
-
tags/1.2.3 (copied) (copied from live-rates-for-shipstation/trunk)
-
tags/1.2.3/changelog.txt (modified) (1 diff)
-
tags/1.2.3/core/api/shipstation.php (modified) (2 diffs)
-
tags/1.2.3/core/classes/shipping-calculator.php (modified) (2 diffs)
-
tags/1.2.3/live-rates-for-shipstation.php (modified) (2 diffs)
-
tags/1.2.3/readme.txt (modified) (3 diffs)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/core/api/shipstation.php (modified) (2 diffs)
-
trunk/core/classes/shipping-calculator.php (modified) (2 diffs)
-
trunk/live-rates-for-shipstation.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
live-rates-for-shipstation/tags/1.2.3/changelog.txt
r3453976 r3454074 2 2 3 3 This 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 7 Relase 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. 4 16 5 17 = 1.2.2 = -
live-rates-for-shipstation/tags/1.2.3/core/api/shipstation.php
r3452263 r3454074 351 351 $warehouses = get_transient( $trans_key ); 352 352 353 if( empty( $warehouses ) || $this->skip_cache ) { 354 353 if( false === $warehouses || $this->skip_cache ) { 354 355 $warehouses = array(); 355 356 $body = $this->make_request( 'get', 'warehouses' ); 356 357 … … 361 362 362 363 // 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 381 383 } 382 383 $warehouses[ $warehouse['warehouse_id'] ] = $warehouse;384 385 384 } 386 385 387 386 // 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(); 394 392 395 393 } -
live-rates-for-shipstation/tags/1.2.3/core/classes/shipping-calculator.php
r3453976 r3454074 654 654 } 655 655 656 $dimensions['running']['weight'] = $dimensions['running']['weight'] + ( floatval( $request['weight'] ) * $this->get_cartitem_val ue( $key, 'quantity', 1 ) );657 $dimensions['running']['height'] = $dimensions['running']['height'] + ( floatval( $product->get_height() ) * $this->get_cartitem_val ue( $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 ) ); 658 658 $dimensions['largest'] = array( 659 659 'length' => ( $dimensions['largest']['length'] < $product->get_length() ) ? $product->get_length() : $dimensions['largest']['length'], … … 1262 1262 public function get_products() { 1263 1263 if( empty( $this->cart ) ) return array(); 1264 return array_co lumn( $this->cart, 'data');1264 return array_combine( array_keys( $this->cart ), array_column( $this->cart, 'data' ) ); 1265 1265 } 1266 1266 -
live-rates-for-shipstation/tags/1.2.3/live-rates-for-shipstation.php
r3453976 r3454074 4 4 * Plugin URI: https://iqcomputing.com/contact/ 5 5 * Description: ShipStation shipping method with live rates. 6 * Version: 1.2. 26 * Version: 1.2.3 7 7 * Requires at least: 6.2 8 8 * Author: IQComputing … … 26 26 * @var String 27 27 */ 28 protected static $version = '1.2. 2';28 protected static $version = '1.2.3'; 29 29 30 30 -
live-rates-for-shipstation/tags/1.2.3/readme.txt
r3453976 r3454074 4 4 Requires at least: 5.9 5 5 Tested up to: 6.8 6 Stable tag: 1.2. 26 Stable tag: 1.2.3 7 7 License: GPLv3 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 51 51 == Changelog == 52 52 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 53 57 = 1.2.2 (2026-02-04) = 54 58 * Replaces PHP 8.5 func array_first with reset. (Thanks Theo)! … … 56 60 = 1.2.1 (2026-02-02) = 57 61 * 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 2 2 3 3 This 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 7 Relase 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. 4 16 5 17 = 1.2.2 = -
live-rates-for-shipstation/trunk/core/api/shipstation.php
r3452263 r3454074 351 351 $warehouses = get_transient( $trans_key ); 352 352 353 if( empty( $warehouses ) || $this->skip_cache ) { 354 353 if( false === $warehouses || $this->skip_cache ) { 354 355 $warehouses = array(); 355 356 $body = $this->make_request( 'get', 'warehouses' ); 356 357 … … 361 362 362 363 // 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 381 383 } 382 383 $warehouses[ $warehouse['warehouse_id'] ] = $warehouse;384 385 384 } 386 385 387 386 // 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(); 394 392 395 393 } -
live-rates-for-shipstation/trunk/core/classes/shipping-calculator.php
r3453976 r3454074 654 654 } 655 655 656 $dimensions['running']['weight'] = $dimensions['running']['weight'] + ( floatval( $request['weight'] ) * $this->get_cartitem_val ue( $key, 'quantity', 1 ) );657 $dimensions['running']['height'] = $dimensions['running']['height'] + ( floatval( $product->get_height() ) * $this->get_cartitem_val ue( $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 ) ); 658 658 $dimensions['largest'] = array( 659 659 'length' => ( $dimensions['largest']['length'] < $product->get_length() ) ? $product->get_length() : $dimensions['largest']['length'], … … 1262 1262 public function get_products() { 1263 1263 if( empty( $this->cart ) ) return array(); 1264 return array_co lumn( $this->cart, 'data');1264 return array_combine( array_keys( $this->cart ), array_column( $this->cart, 'data' ) ); 1265 1265 } 1266 1266 -
live-rates-for-shipstation/trunk/live-rates-for-shipstation.php
r3453976 r3454074 4 4 * Plugin URI: https://iqcomputing.com/contact/ 5 5 * Description: ShipStation shipping method with live rates. 6 * Version: 1.2. 26 * Version: 1.2.3 7 7 * Requires at least: 6.2 8 8 * Author: IQComputing … … 26 26 * @var String 27 27 */ 28 protected static $version = '1.2. 2';28 protected static $version = '1.2.3'; 29 29 30 30 -
live-rates-for-shipstation/trunk/readme.txt
r3453976 r3454074 4 4 Requires at least: 5.9 5 5 Tested up to: 6.8 6 Stable tag: 1.2. 26 Stable tag: 1.2.3 7 7 License: GPLv3 or later 8 8 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 51 51 == Changelog == 52 52 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 53 57 = 1.2.2 (2026-02-04) = 54 58 * Replaces PHP 8.5 func array_first with reset. (Thanks Theo)! … … 56 60 = 1.2.1 (2026-02-02) = 57 61 * 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.