Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save dislokacia/1b1b171b4c0f3cfa021c948ba82bbee2 to your computer and use it in GitHub Desktop.

Select an option

Save dislokacia/1b1b171b4c0f3cfa021c948ba82bbee2 to your computer and use it in GitHub Desktop.

Revisions

  1. dislokacia created this gist Jun 10, 2022.
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    jQuery(document).ready(function( $ ){
    $( document ).ajaxComplete(function() {
    if (!Cookies.get('woocommerce_items_in_cart')) {
    $('.empty_message').show();
    } else {
    $('.empty_message').hide();
    }
    });
    if (!Cookies.get('woocommerce_items_in_cart')) {
    $('.empty_message').show();
    }
    });
    3 changes: 3 additions & 0 deletions css
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    .empty_message {
    display: none;
    }