Created
July 29, 2017 20:03
-
-
Save JodiWarren/6dff7de57fb4e839ff3dbae338a98167 to your computer and use it in GitHub Desktop.
Hide out of stock products on an online store
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jQuery("[data-mh=category-list-product]").each((index, item) => { | |
| const availability = jQuery(item).find('.availability'); | |
| if(availability.hasClass('out-of-stock')){ | |
| item.remove(); | |
| } | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment