get_date_created(); $properties = array( 'order_id' => $id, 'next_status' => $next_status, 'previous_status' => $previous_status, 'date_created' => $date->date( 'Y-m-d' ), ); WC_Tracks::record_event( 'orders_edit_status_change', $properties ); } }