Listen on payment status return request earlier, from ‚template_redirect’ to ‚wp_loaded’.