How can I recover a deleted product card grid snippet?

Help, I have accidentally deleted my product card grid snippet and have no idea to get it back. Any advice would be much appreciated.

This now appears under my collections

Liquid error (product-grid-collage line 165): Could not find asset snippets/product-grid-item.liquid

Hi @Diosaessence

There are a few things you can try to assist in recovering that removed snippet from your theme file.

The first step before making any additional changes is to create a duplicate of your theme file in it’s current state and publish the duplicate. This way we have a safe recovery point and can make changes to the original theme file without affecting the live website. I strongly suggest making this a common practice for all your theme changes moving forward!

In the original theme file open the edit code area and navigate to the theme file section that is missing the snippet. At the top of the code field will be a link that says “older versions”, click the link and then choose the next most recent date or the date you made the coding change from the drop down menu. Save and preview to see if it corrected it.

If it did not correct it, you will want to download a fresh copy of your theme file and either replace the code entirely or source the missing snippet from the fresh theme and copy/paste it into the original theme file.

Hopefully this solves it for you!