array( 'group' => 'WooCommerce', 'name' => 'WooCommerce order pending', 'description' => 'WooCommerce order status changed to pending' ), self::WOOCOMMERCE_ORDER_PROCESSING => array( 'group' => 'WooCommerce', 'name' => 'WooCommerce order processing', 'description' => 'WooCommerce order status changed to processing' ), self::WOOCOMMERCE_ORDER_ONHOLD => array( 'group' => 'WooCommerce', 'name' => 'WooCommerce order on-hold', 'description' => 'WooCommerce order status changed to on hold' ), self::WOOCOMMERCE_ORDER_COMPLETED => array( 'group' => 'WooCommerce', 'name' => 'WooCommerce order completed', 'description' => 'WooCommerce order status changed to completed' ), self::WOOCOMMERCE_ORDER_CANCELLED => array( 'group' => 'WooCommerce', 'name' => 'WooCommerce order cancelled', 'description' => 'WooCommerce order status changed to cancelled' ), self::WOOCOMMERCE_ORDER_REFUNDED => array( 'group' => 'WooCommerce', 'name' => 'WooCommerce order refunded', 'description' => 'WooCommerce order status changed to refounded' ), self::WOOCOMMERCE_ORDER_FAILED => array( 'group' => 'WooCommerce', 'name' => 'WooCommerce order failed', 'description' => 'WooCommerce order status changed to failed' ), self::AMAZON_FULFILLMENT_RECEIVED => array( 'group' => 'Amazon', 'name' => 'fulfillment received', 'description' => 'The fulfillment order was received by Amazon Marketplace Web Service (Amazon MWS) and validated. Validation includes determining that the destination address is valid and that Amazon s records indicate that the seller has enough sellable (undamaged) inventory to fulfill the order. The seller can cancel a fulfillment order that has a status of received.' ), self::AMAZON_FULFILLMENT_INVALID => array( 'group' => 'Amazon', 'name' => 'fulfillment invalid', 'description' => 'The fulfillment order was received by Amazon Marketplace Web Service (Amazon MWS) but could not be validated. The reasons for this include an invalid destination address or Amazon s records indicating that the seller does not have enough sellable inventory to fulfill the order. When this happens, the fulfillment order is invalid and no items in the order will ship.' ), self::AMAZON_FULFILLMENT_PLANNING => array( 'group' => 'Amazon', 'name' => 'fulfillment planning', 'description' => 'The fulfillment order has been sent to Amazon s fulfillment network to begin shipment planning, but no unit in any shipment has been picked from inventory yet. The seller can cancel a fulfillment order that has a status of planning.' ), self::AMAZON_FULFILLMENT_PROCESSING => array( 'group' => 'Amazon', 'name' => 'fulfillment processing', 'description' => 'The process of picking units from inventory has begun on at least one shipment in the fulfillment order. The seller cannot cancel a fulfillment order that has a status of processing.' ), self::AMAZON_FULFILLMENT_CANCELLED => array( 'group' => 'Amazon', 'name' => 'fulfillment cancelled', 'description' => 'The fulfillment order has been cancelled by the seller.' ), self::AMAZON_FULFILLMENT_COMPLETE => array( 'group' => 'Amazon', 'name' => 'fulfillment complete', 'description' => 'All item quantities in the fulfillment order have been fulfilled.' ), self::AMAZON_FULFILLMENT_COMPLETE_PARTIALLED => array( 'group' => 'Amazon', 'name' => 'fulfillment partial complete', 'description' => 'Some item quantities in the fulfillment order were fulfilled; the rest were either cancelled or unfulfillable.' ), self::AMAZON_FULFILLMENT_UNFULFILLABLE => array( 'group' => 'Amazon', 'name' => 'fulfillment unfillable', 'description' => 'No item quantities in the fulfillment order could be fulfilled because the Amazon fulfillment center workers found no inventory for those items or found no inventory that was in sellable (undamaged) condition' ) ); public static function getEventGroups() { $groups = array(); foreach(self::$events as $event) { $groups[] = $event['group']; } return array_unique($groups); } public static function getEvents($group = NULL) { $events = array(); foreach(self::$events as $eventId => $event) { if($group === NULL || $group === $event['group']) { $events[$eventId] = $event; } } return $events; } }