Add Content to Empty Cart Page

If you want to enter some content when cart page is empty than here is solutions. Add below line of code in at the end of your theme’s functions.php file of your active child theme and Save the file.

add_action( 'woocommerce_cart_is_empty', 'codeithub_add_content_empty_cart' );
function codeithub_add_content_empty_cart() {
   echo 'This will show on the empty cart page';
Content on Empty Cart
See also  Lightweight Content Slider with Pure CSS / CSS3

Leave a Reply

Your email address will not be published. Required fields are marked *