You are here

protected function UPSRateBase::newPackage in Ubercart 8.4

Pseudo-constructor to set default values of a package.

1 call to UPSRateBase::newPackage()
UPSRateBase::packageProducts in shipping/uc_ups/src/Plugin/Ubercart/ShippingQuote/UPSRateBase.php
Organizes products into packages for shipment.

File

shipping/uc_ups/src/Plugin/Ubercart/ShippingQuote/UPSRateBase.php, line 337

Class

UPSRateBase
Common functionality for UPS shipping quotes plugins.

Namespace

Drupal\uc_ups\Plugin\Ubercart\ShippingQuote

Code

protected function newPackage() {
  $package = new \stdClass();
  $package->price = 0;
  $package->qty = 1;
  $package->pkg_type = '02';
  $package->weight = 0;
  $package->weight_units = 'lb';
  $package->length = 0;
  $package->width = 0;
  $package->height = 0;
  $package->length_units = 'in';
  return $package;
}