You are here

function payment_commerce_payment_line_item_get in Payment for Drupal Commerce 7.2

Same name and namespace in other branches
  1. 7 payment_commerce.module \payment_commerce_payment_line_item_get()

Implements PaymentLineItemInfo::callback.

1 string reference to 'payment_commerce_payment_line_item_get'
payment_commerce_payment_line_item_info in ./payment_commerce.module
Implements hook_payment_line_item_info().

File

./payment_commerce.module, line 142
Hook implementations and shared functions.

Code

function payment_commerce_payment_line_item_get($name, Payment $payment) {
  $selection = array();
  foreach ($payment->line_items as $line_item) {
    if (substr($line_item->name, 0, 17) == 'payment_commerce_') {
      $selection[] = $line_item;
    }
  }
  return $selection;
}