Adding Google Ads event snippet inside php command in header.php file

Solution:

You can try this:

<?php if($ord['status'] == 'confirmed) { ?> 

<script>
  gtag('event', 'conversion', {
      'send_to': 'AW-712937327/fA8JCJeerakBEO-e-tMC',
      'value': 1.0,
      'currency': 'GBP',
      'transaction_id': ''
  });
</script>


<?php } ?>