---
title: How to Show Recently Restocked Products in WooCommerce
description: "Show a back-in-stock product grid on any page with the [alg_wc_stock_snapshot_restocked] shortcode, and tune how far back it looks."
url: "https://wpfactory.com/docs/stock-history-restocked-products/"
updated: "2026-10-05"
category: How to
---

# How to Show Recently Restocked Products in WooCommerce

To show recently restocked products in WooCommerce, add the `[alg_wc_stock_snapshot_restocked]` shortcode from [Stock History & Reports Manager for WooCommerce](https://wpfactory.com/item/stock-snapshot-for-woocommerce/) to any page. It displays in-stock products whose stock went up in their latest snapshot, as a standard product grid. The shortcode is listed under **WPFactory > Stock Snapshot > General > Shortcodes**.

![a front-end "Back in stock" page built with the [alg_wc_stock_snapshot_restocked] shortcode](https://wpfactory.com/wp-content/uploads/stock-history-restocked-products-1.png)

## Before you start

- Products need **Manage stock?** enabled and at least two snapshots, so there is a previous quantity to compare with.
- The shortcode is free.

## Steps

1. Go to **Pages > Add New Page** and give it a title, such as "Back in Stock".
2. Add a **Shortcode** block with:
   ```
   [alg_wc_stock_snapshot_restocked columns="4" orderby="last_restocked" order="DESC" total_snapshots="3"]
   ```
3. Publish the page and view it.

## How "restocked" is decided

For each in-stock product, the shortcode compares the latest snapshot with earlier ones:

- It looks back up to `total_snapshots` snapshots (default 1, the one just before the latest).
- If the latest quantity is higher than one of those earlier quantities by at least `min_stock_diff` (default 1), the product is listed.
- A product with only one snapshot is listed only when `new_stock="yes"` and its stock is above 0.

Because periodic snapshots record every product, an unchanged quantity at the next scheduled snapshot pushes the restock further back. With the default `total_snapshots="1"`, a product drops off the list after the next snapshot that records no change. Raise `total_snapshots` to keep restocked items visible longer. For example, with daily snapshots, `total_snapshots="7"` covers about a week.

## Shortcode attributes

| Attribute | What it does | Default |
| --- | --- | --- |
| `min_stock_diff` | Minimum stock increase to count as a restock. | 1 |
| `total_snapshots` | How many earlier snapshots to compare with. | 1 |
| `new_stock` | `yes` also lists products with a single snapshot and stock above 0. | no |
| `columns` | Number of grid columns. | 4 |
| `paginate` | `yes` adds pagination to the grid. | no |
| `orderby` | Sort order: `name`, `ID`, `date`, `modified`, `rand` and other standard WooCommerce values, or `last_restocked` to sort by restock time. | name |
| `order` | `ASC` or `DESC`. | ASC |
| `not_found_msg` | Message shown when nothing matches. | `<p>No restocked products found.</p>` |

The shortcode also works with the brand filter widget from the Perfect Brands for WooCommerce plugin: when a brand filter is active, the list is limited to those brands.

## Frequently asked questions

### Why is the restocked list empty?

No in-stock product has a recent increase. Check that products have at least two snapshots and that the latest is higher than the one before. Try `total_snapshots="7"` to look further back, or `new_stock="yes"` for newly tracked products.

### How quickly does the list update after I restock?

Results are cached, and the cache is cleared every time a snapshot is taken or the plugin settings are saved. Updating a product's stock records a snapshot, so the list refreshes on the next page view. If you use page caching, clear that too.

### Can I show the newest restocks first?

Yes. Use `orderby="last_restocked" order="DESC"`.

### Are out-of-stock products ever shown?

No. Only products with the In stock status are checked.

### Get more from Stock History

This shortcode is free. [Stock History & Reports Manager for WooCommerce](https://wpfactory.com/item/stock-snapshot-for-woocommerce/) Pro adds a daily restocked-products email for your team. [See what Pro unlocks](https://wpfactory.com/item/stock-snapshot-for-woocommerce/).

Need a hand? Our team answers every ticket on the [Stock History support forum](https://wpfactory.com/support/).

Related articles

- [How to See WooCommerce Stock History for a Product](https://wpfactory.com/docs/stock-history-product/)
- [How to Email WooCommerce Stock Reports Automatically](https://wpfactory.com/docs/stock-history-email-reports/)
- [How to Schedule Automatic WooCommerce Stock Snapshots](https://wpfactory.com/docs/stock-history-schedule-snapshots/)
- [How to See WooCommerce Stock Levels on a Past Date](https://wpfactory.com/docs/stock-history-past-stock-levels/)
- [How to Create a WooCommerce Stock Change Report](https://wpfactory.com/docs/stock-history-stock-change-report/)
