Hi
Two methods you can select:
1. Actually, you can insert your code to Purchase Confirmation page content as below, even the code is not in the head tag, it will works as normal.
https://www.dropbox.com/s/8itwppbh8wa41zj/Screenshot%202018-05-21%2000.20.44.png?dl=0
2. You should find out the Purchase Confirmation page id, let’s say this page id is 5, then add the following codes to your functions.php
add_action('wp_head',function(){
if(is_page(5)){
echo '';
}
});
You can find the page id in URL when you edit this page. https://www.dropbox.com/s/s3zvbhdztid96a9/Screenshot%202018-05-21%2000.34.09.png?dl=0
Thanks