0

Can someone please help me write this PHP so that the word "here" is a hyperlink to a new tab?

<p>
<?php printf( __( "Hi there. Your recent purchase for %s was successful. A confirmation PDF is attached and your order details are shown below for your reference. 
<br>
Have you heard about our upcoming CD release? Pre-order your copy now by clicking here", 'woocommerce' ), get_option( 'blogname' ) ); ?>

Thanks!

Miroslav Glamuzina
  • 4,472
  • 2
  • 19
  • 33

1 Answers1

-1
<p>
<?php printf( __( "Hi there. Your recent purchase for %s was successful. A confirmation PDF is attached and your order details are shown below for your reference. 
<br>
Have you heard about our upcoming CD release? Pre-order your copy now by clicking <a href='path/to/file'>here</a>, 'woocommerce' ), get_option( 'blogname' ) ); ?>
Ralph
  • 337
  • 4
  • 13
  • You really need to escape data you're concatenating into HTML with `htmlspecialchars()` or equivalent. Without this, you risk creating invalid HTML, or even potential security vulnerabilities. – Brad Apr 01 '19 at 05:22