You are here

function hook_commerce_payment_transaction_load in Commerce Core 7

Allows you to act when transactions are being loaded.

Parameters

$transactions: An array of transactions indexed by transaction_id.

File

modules/payment/commerce_payment.api.php, line 504
Hooks provided by the Payment module.

Code

function hook_commerce_payment_transaction_load($transactions) {
  $result = db_query('SELECT transaction_id, foo FROM {mytable} WHERE transaction_ids IN (:transaction_ids)', array(
    ':transaction_ids' => array_keys($transactions),
  ));
  foreach ($result as $record) {
    $transactions[$record->transaction_id]->foo = $record->foo;
  }
}