function commerce_invoice_action_load_current in Commerce Invoice 7.2
Rules action: Fetch current invoice in order.
Parameters
object $order:
Return value
array An array containing the invoice keyed as commerce_invoice, or an empty array if no invoice exists.
1 string reference to 'commerce_invoice_action_load_current'
- commerce_invoice_rules_action_info in ./
commerce_invoice.rules.inc - Implements hook_rules_action_info().
File
- ./
commerce_invoice.rules.inc, line 107 - Rules integration for the Commerce Invoice module.
Code
function commerce_invoice_action_load_current($order) {
$invoice = commerce_invoice_load_current($order);
return $invoice ? array(
'commerce_invoice' => $invoice,
) : array();
}