{"action":"closed","issue":{"url":"https://api.github.com/repos/cubecart/v6/issues/856","labels_url":"https://api.github.com/repos/cubecart/v6/issues/856/labels{/name}","comments_url":"https://api.github.com/repos/cubecart/v6/issues/856/comments","events_url":"https://api.github.com/repos/cubecart/v6/issues/856/events","html_url":"https://github.com/cubecart/v6/issues/856","id":110319777,"number":856,"title":"Order of Order History Logging","user":{"login":"bhsmither","id":4073092,"avatar_url":"https://avatars.githubusercontent.com/u/4073092?v=3","gravatar_id":"","url":"https://api.github.com/users/bhsmither","html_url":"https://github.com/bhsmither","followers_url":"https://api.github.com/users/bhsmither/followers","following_url":"https://api.github.com/users/bhsmither/following{/other_user}","gists_url":"https://api.github.com/users/bhsmither/gists{/gist_id}","starred_url":"https://api.github.com/users/bhsmither/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhsmither/subscriptions","organizations_url":"https://api.github.com/users/bhsmither/orgs","repos_url":"https://api.github.com/users/bhsmither/repos","events_url":"https://api.github.com/users/bhsmither/events{/privacy}","received_events_url":"https://api.github.com/users/bhsmither/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cubecart/v6/labels/wontfix/unsure","name":"wontfix/unsure","color":"ffffff"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-07T21:23:41Z","updated_at":"2015-12-11T15:38:30Z","closed_at":"2015-12-11T15:38:30Z","body":"It's small thing, but it may matter somewhere.\r\n\r\nWhen admin moves an order from Pending straight to Completed, the Order class will first make sure that the order goes through Processing (if `config['no_skip_processing_check']` is set to do so).\r\n\r\nBut when entering the Order->orderStatus() function, one of the **first** things it does is log into the order history table the status being requested.\r\n\r\nThus, the order history table will show, in order, for this scenario, an order at Pending, then Complete, then Processing.\r\n\r\nIt *may* be important to know how the order status was managed in a way that the sequence of history table records imply as being not correct.\r\n\r\nSuggest that the call to log in the order history table be moved to just above:\r\n```\r\n// Set status to complete if it is digital only\r\nif ($complete) {\r\n```\r\n"}}