Problem/Motivation
According to views.api documentation the use of hook_views_post_render is:
function hook_views_post_render(ViewExecutable $view, &$output, CacheBackendInterface $cache) {
In a module, this works as designed, but when this hook is used in a theme. the $output and $cache variables are NULL.
Proposed resolution
Fix it, test it.
Remaining tasks
Requires a test
User interface changes
none
API changes
none