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

edd_empty_cart_message

This filter is used when displaying the “your cart is empty” message and can be used to modify the message that is displayed. The sample below shows an example of how you could modify it:

function my_custom_empty_cart_message($message) {
	return '

' . $message . ' Please buy something.

'; } add_filter('edd_empty_cart_message', 'my_custom_empty_cart_message');

This will add paragraph tags around the message, and include the words “Please buy something”.

You can customize the “your cart is empty” message or even load specific content on the cart page when it is empty. You can do this without touching any PHP code with the
free Additional Shortcodes extension. Click here to learn more and download or read more about it on this article.