Version 4.1.2

This commit is contained in:
Neo committed 2025-12-19 05:32:19 -08:00
1 parent 3ba79295ee
commit 28bd025b35
1131 files changed
+63658 -20579

No files matched your search

@@ -308,7 +308,7 @@ class _shipping extends \IPS\Dispatcher\Controller
}, NULL, 'oz', 'easypost_package_weight' ) );
$matrix = NULL;
$fromCountry = \IPS\GeoLocation::buildFromJson( \IPS\Settings::i()->site_address )->country;
$fromCountry = \IPS\GeoLocation::buildFromJson( \IPS\Settings::i()->easypost_address ?: \IPS\Settings::i()->site_address )->country;
if ( $fromCountry != $shipment->data['address']['country'] )
{
$originCountries = array();
@@ -418,7 +418,7 @@ class _shipping extends \IPS\Dispatcher\Controller
/* Send API call */
$toAddress = $shipment->data['address'];
$fromAddress = \IPS\GeoLocation::buildFromJson( \IPS\Settings::i()->site_address );
$fromAddress = \IPS\GeoLocation::buildFromJson( \IPS\Settings::i()->easypost_address ?: \IPS\Settings::i()->site_address );
$easyPost = \IPS\Http\Url::external( 'https://api.easypost.com/v2/shipments' )->request()->login( \IPS\Settings::i()->easypost_api_key, '' )->post( array( 'shipment' => array(
'to_address' => array(
'street1' => array_shift( $toAddress['addressLines'] ),