You are here

protected function USPSRateBase::newPackage in Ubercart 8.4

Pseudo-constructor to set default values of a package.

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

File

shipping/uc_usps/src/Plugin/Ubercart/ShippingQuote/USPSRateBase.php, line 332

Class

USPSRateBase
Common functionality for USPS shipping quotes plugins.

Namespace

Drupal\uc_usps\Plugin\Ubercart\ShippingQuote

Code

protected function newPackage() {
  $package = new \stdClass();
  $package->price = 0;
  $package->qty = 1;
  $package->pounds = 0;
  $package->ounces = 0;
  $package->container = 0;
  $package->size = 0;
  $package->machinable = TRUE;
  $package->length = 0;
  $package->width = 0;
  $package->height = 0;
  $package->girth = 0;

  //  $package->length_units = 'in';
  //  $package->weight_units = 'lb';
  return $package;
}