function commerce_cop_get_payments in Commerce Custom Offline Payments 7
Function to get custom payments.
6 calls to commerce_cop_get_payments()
- commerce_cop_admin_overview in ./
commerce_cop.admin.inc - Returns an administrative overview of all custom offline payments.
- commerce_cop_commerce_payment_method_info in ./
commerce_cop.module - Implements hook_commerce_payment_method_info().
- commerce_custom_offline_payment_features_export in ./
commerce_custom_offline_payment.features.inc - Implements hook_features_export().
- commerce_custom_offline_payment_features_export_options in ./
commerce_custom_offline_payment.features.inc - Implements hook_features_export_options().
- commerce_custom_offline_payment_features_export_render in ./
commerce_custom_offline_payment.features.inc - Implements hook_features_export_render().
File
- ./
commerce_cop.module, line 363 - Custom offline payment methods for Drupal Commerce.
Code
function commerce_cop_get_payments() {
static $payments = array();
if (empty($payments)) {
$q = db_select('commerce_custom_offline_payment', 'cop');
$q
->fields('cop');
$q
->orderBy('cop.title');
$q = $q
->execute();
while ($payment = $q
->fetchAssoc()) {
$payments[$payment['id']] = $payment;
}
}
return $payments;
}