We use the website to also handle offline payments, such as cash and via PIN. We have a plugin that's supposed to take care of the order status of these orders, because otherwise the status will stay on waiting for payment.
This is the function, in the func.php file from the add-on:
I would add some logging to veriffy that the full condition is being satisfied, especially the '$from_status field. There might be an intermediate step being generated that is affecting the condition.
Adding either of those codes to my function doesn't actually do anything... it's as if it's never executed. I forgot a ; and the page didn't load anymore; so it does load func.php in but apparently the function is never called...
Putting die(); at the beginning of the function does nothing. So I assume it has something to do with the hook not being called, but then I would have to be looking into the core files... And I'm no expert unfortunately.
Then you most likely have a typo in your init.php where you call register_hooks() or you have register_hooks in a non-standard location and it's not being called.