Skip to main content
Easy Digital Downloads Documentation
Documentation, Reference Materials, and Tutorials for Easy Digital Downloads

edd_purchase_receipt

This filter can be used to modify the purchase receipt email that is sent to users after purchasing downloads.

The filter accepts three parameters:

  • $message – an HTML string containing the contents of the email
  • $payment_id – the numerical ID of the purchase
  • $payment_data – an array of the payment meta data

An example of how you can append additional information to the purchase receipt is below:

function add_to_purchase_receipt($message, $payment_id, $purchase_data) {
	// add custom text to the end of the receipt
	$message .= "nnThis is custom text added to the end of the purchase receipt";
	return $message;
}
add_filter('edd_purchase_receipt', 'add_to_purchase_receipt', 10, 3);
Read our latest blog post:
NEW: Bulk Generate, Save & Export Invoices