The modification is correct. But make sure that you're doing it for the correct template. You should have once instance of that view file for each template on your website. If you have several templates, you might not be editing the view file for the template you're actually using.
Also, for some payment plugins, it's the file "end" of the view "checkout" which should be edited instead of the "after_end" file (when the payment happens on your website or when you're using offline payment plugins like the bank transfer).