You are here

function commerce_invoice_statuses in Commerce Invoice 7.2

A list of invoice statuses.

Return value

string<string> Invoice statuses keyed by their machine name (one of the Invoice::STATUS_ constants).

2 calls to commerce_invoice_statuses()
commerce_invoice_create_from_order_form in ./commerce_invoice.admin.inc
Form callback for invoicing orders.
commerce_invoice_form in ./commerce_invoice.admin.inc
Entity API form callback for an invoice.
2 string references to 'commerce_invoice_statuses'
commerce_invoice_entity_property_info in ./commerce_invoice.info.inc
Implements hook_entity_property_info().
InvoiceMetadataController::entityPropertyInfo in src/Entity/InvoiceMetadataController.php

File

./commerce_invoice.module, line 136
The Commerce Invoice module.

Code

function commerce_invoice_statuses() {
  $statuses = [
    Invoice::STATUS_PENDING => t('Pending'),
    Invoice::STATUS_PAID => t('Paid'),
    Invoice::STATUS_CANCELED => t('Canceled'),
    Invoice::STATUS_REFUND_PENDING => t('Pending refund'),
    Invoice::STATUS_REFUNDED => t('Refunded'),
  ];
  drupal_alter(__FUNCTION__, $statuses);
  return $statuses;
}