You are here

function mailchimp_ecommerce_get_order_statuses in Mailchimp E-Commerce 7

Helper function to get order statuses in correct order.

Taken from commerce_order_handler_filter_order_status->get_value_options().

2 calls to mailchimp_ecommerce_get_order_statuses()
mailchimp_ecommerce_admin_settings in includes/mailchimp_ecommerce.admin.inc
The Mailchimp eCommerce settings form.
mailchimp_ecommerce_get_mc_order_statuses in ./mailchimp_ecommerce.module
Helper function to get Mailchimp order status.

File

./mailchimp_ecommerce.module, line 1380
Mailchimp eCommerce core functionality.

Code

function mailchimp_ecommerce_get_order_statuses() {
  $order_statuses = array();
  foreach (commerce_order_state_get_title() as $name => $title) {
    foreach (commerce_order_statuses(array(
      'state' => $name,
    )) as $order_status) {
      $order_statuses[$order_status['name']] = $order_status['title'];
    }
  }
  return $order_statuses;
}