function commerce_no_payment_commerce_payment_transaction_count in Commerce No Payment 7.2
Counts the number of Commerce No Payment Commerce Payment transactions.
Return value
int
2 calls to commerce_no_payment_commerce_payment_transaction_count()
- CommerceNoPaymentUpgrade::testUpgrade in tests/
CommerceNoPaymentUpgrade.test - Tests the upgrade process.
- commerce_no_payment_update_7201 in ./
commerce_no_payment.install - Creates Payment payments for Commerce Payment payment transactions that use Commerce No Payment.
File
- ./
commerce_no_payment.module, line 33 - Provides a payment method for Drupal Commerce for orders that do not require a payment (free stuff).
Code
function commerce_no_payment_commerce_payment_transaction_count($commerce_payment_method) {
return db_select('commerce_payment_transaction')
->condition('payment_method', $commerce_payment_method)
->condition('instance_id', $commerce_payment_method . '|commerce_payment_' . $commerce_payment_method)
->countQuery()
->execute()
->fetchField();
}