hook_alloc_get_address

Definition

hook_alloc_get_address($txn, $atype = 'billing')
ecommerce-5--4/docs/developer/hooks/ec_receipt.php, line 263

Description

The allocation object provider returns an appropriate address. Eg. store returns an address from the transaction object.

Related topics

Namesort iconDescription
HooksAllow modules to interact with the Drupal core.

Code

<?php
function hook_alloc_get_address($txn, $atype = 'billing') {
  if (!empty($txn->address[$atype])) {
    return (array)$txn->address[$atype];
  }
}
?>