You are here

function uc_ups_uc_shipping_type in Ubercart 8.4

Same name and namespace in other branches
  1. 7.3 shipping/uc_ups/uc_ups.module \uc_ups_uc_shipping_type()

Implements hook_uc_shipping_type().

File

shipping/uc_ups/uc_ups.module, line 234
UPS shipping quote module.

Code

function uc_ups_uc_shipping_type() {
  $quote_config = \Drupal::config('uc_quote.settings');
  $weight = $quote_config
    ->get('type_weight');
  $types = [];
  $types['small_package'] = [
    'id' => 'small_package',
    'title' => t('Small packages'),
    'weight' => $weight['small_package'],
  ];
  return $types;
}