• Resolved atracksler

    (@atracksler)


    I’m trying to format the link in the email receipt a customer receives for a download link.

    In /plain/email-downlooads.php (I think) is where I find the code that outputs the data.

    case 'download-product':
    					echo esc_html( $download['product_name'] );
    					break;
    				case 'download-file':
    					echo esc_html( $download['download_name'] ) . ' - ' . esc_url( $download['download_url'] );
    					break;
    				case 'download-expires':
    					if ( ! empty( $download['access_expires'] ) ) {
    						echo esc_html( date_i18n( get_option( 'date_format' ), strtotime( $download['access_expires'] ) ) );
    					} else {
    						esc_html_e( 'Never', 'woocommerce' );
    					}

    How can I format it so that the name of the download is Bolded?

Viewing 1 replies (of 1 total)
  • Hi @atracksler

    Please try replacing the code with the following:

    case 'download-product':
    					echo esc_html( $download['product_name'] );
    					break;
    				case 'download-file':
    					echo esc_html( '<strong>' . $download['download_name'] ) . '</strong> - ' . esc_url( $download['download_url'] );
    					break;
    				case 'download-expires':
    					if ( ! empty( $download['access_expires'] ) ) {
    						echo esc_html( date_i18n( get_option( 'date_format' ), strtotime( $download['access_expires'] ) ) );
    					} else {
    						esc_html_e( 'Never', 'woocommerce' );
    					}

    Regards

Viewing 1 replies (of 1 total)
  • The topic ‘Formatting Download link in email’ is closed to new replies.