How to Show Recently Viewed Products in WooCommerce

Most shoppers do not buy the first time they land on a product page. They browse, compare, get distracted, then come back. If they cannot find that product again, you lose the sale.

The numbers back this up. Salesforce studied 250 million ecommerce visits and found that visits where a shopper clicked a product recommendation made up only 7% of traffic but drove 24% of orders and 26% of revenue. Those same shoppers spent 12.9 minutes on site, compared to 2.9 minutes for everyone else.

Recently viewed products is the easiest recommendation block you can add. It needs no AI, no big data set, and no monthly fee. It just shows people what they already looked at. In this guide you’ll learn how to show recently viewed products in WooCommerce.

How WooCommerce Tracks Recently Viewed Products

You should understand this before you pick a method. It explains almost every problem people run into.

When a shopper opens a product page, WooCommerce runs a function called wc_track_product_view(). That function saves the product ID into a cookie named woocommerce_recently_viewed. The IDs are separated by a pipe character, like 154|89|233.

Four facts matter here:

FactWhat it means for you
It stores a maximum of 15 product IDsOlder views drop off the list
It is a session cookieThe list clears when the shopper closes the browser
It works for guests and logged-in usersNo account needed
It only runs if the legacy widget is activeThis is the part that breaks most setups

Before You Start

Run through this quick checklist:

  • WooCommerce is installed and active
  • You have at least a few published products
  • You know whether your theme is a classic theme or a block theme
  • You have a recent backup, or you are using a staging site

How to tell your theme type: Go to your WordPress dashboard. If you see Appearance > Widgets, you have a classic theme. If you see Appearance > Editor instead, you have a block theme like Twenty Twenty-Four or Twenty Twenty-Five.

Method 1: Use the Built-In WooCommerce Widget (Classic Themes)

This is the fastest way. No plugin, no code. It works with Storefront, Astra, OceanWP, Flatsome, Kadence, and most other classic themes.

Steps

Use the Built-In WooCommerce Widget
  1. Log in to your WordPress dashboard.
  2. Go to Appearance > Widgets.
  3. Pick a widget area. A product page sidebar or shop sidebar works best.
  4. Click the plus (+) button.
  5. Search for Recently Viewed Products list. Look for the widget icon, not the block icon.
Drag the widget
  1. Add it to the widget area.
  2. Set the Title. Try “Recently Viewed” or “Pick Up Where You Left Off”.
  3. Set the Number of products to show. The range is 1 to 15. The default is 10.
  4. Click Update.

How to test it

Open your store in an incognito window. Visit three different product pages. Then refresh. You should see the widget fill up with the products you just viewed.

If it stays empty, jump to the troubleshooting section below.

Pros and cons

Good: Free, instant, zero performance cost, no extra plugin.

Not so good: It is a plain vertical list. You cannot make it a grid or a carousel. You can only place it in a widget area, so it will not go under a product description or on the cart page without extra work.

Method 2: Show It in a Block Theme (Site Editor)

Block themes removed the Appearance > Widgets screen. This trips a lot of store owners up.

Here is the honest situation: WooCommerce documentation confirms there is no block equivalent for the Recently Viewed Products list widget. WooCommerce has blocks for Mini-Cart, On Sale Products, Best Sellers, and Top Rated Products. It does not have one for recently viewed.

You still have two options.

Option A: Use the Legacy Widget block

  1. Go to Appearance > Editor.
  2. Open Patterns > Template Parts, then pick your Sidebar or Footer.
  3. Click the plus (+) button to add a block.
  4. Search for Legacy Widget.
  5. Add it, then choose Recently Viewed Products list from the dropdown.
  6. Click Save.

Some block themes hide the Legacy Widget block from the inserter. If you cannot find it, use Option B.

Option B: Add a Widget Area block

Some block themes and plugins add a “Widget Area” or “Sidebar” block that lets you drop classic widgets into a block layout. Check your theme documentation.

If neither option works, go to Method 3. A plugin is faster than fighting the Site Editor.

Method 3: Use a Free Plugin (Best for Most Stores)

A plugin gives you what the core widget cannot: grids, carousels, shortcodes, and placement anywhere you want.

Good free options

PluginBest forKey feature
Recently Viewed Products for WooCommerceFull controlGrid, list, or carousel. Shortcode [rvpw_products], block, and Elementor widget
MATE Recently Viewed ProductsCached sitesLoads over AJAX, so it works with WP Rocket and LiteSpeed
YITH WooCommerce Recently Viewed ProductsStore owners who want follow-up emailsShortcode, widget, and paid email reminders

WooCommerce also sells an official extension called Recently Viewed Products for WooCommerce. It can save viewing history for logged-in users for up to a month, not just a session. That is useful if your products have a long buying cycle.

Steps

Use a Free Plugin
  1. Go to Plugins > Add New.
  2. Search the plugin name.
  3. Click Install Now, then Activate.
recently viewed products plugin
  1. Open the plugin settings page.
  2. Choose your layout: grid, list, or carousel.
  3. Set the number of products and columns.
  4. Turn on automatic placement on single product pages if you want it there. Most plugins let you choose before the summary, after the summary, or after the tabs.
  5. Save.

To place it somewhere else, copy the plugin’s shortcode into any page, post, or block. For example:

[rvpw_products limit=”6″ columns=”3″ layout=”carousel”]

Drop that on your cart page, your shop page, or even your 404 page.

Pros and cons

Good: Works with block themes, gives you carousels and grids, places anywhere, usually cache-friendly.

Not so good: One more plugin to keep updated. Some load extra CSS and JavaScript.

Where to Place Recently Viewed Products

Placement changes results more than design does. Here is what works, and what does not.

LocationWhy it worksPriority
Single product page, below related productsShopper is comparing. This is the exact moment they need itHigh
Cart page, above the cart totalsCatches the “did I forget something” momentHigh
Empty cart pageTurns a dead end into a browsing pageHigh
404 pageBroken link no longer means a lost visitorMedium
Shop and category sidebarHelps shoppers who are deep in a big catalogMedium
My Account dashboardGood for repeat buyers and long buying cyclesMedium
Homepage, below the foldReturning visitors get a personal startMedium
Checkout pageSkip it. Distractions at checkout cost you ordersAvoid

Most tutorials stop at “put it in the sidebar.” The empty cart page and the 404 page are the two spots almost nobody uses, and they cost you nothing.

Recently Viewed vs Related vs Upsells vs Cross-Sells

These get mixed up constantly. Here is the difference in one table.

FeatureBased onWhere it showsWho controls it
Recently viewedThe shopper’s own browsing historyAnywhere you place itAutomatic
Related productsShared category or tagBelow the product summaryAutomatic
UpsellsA better or pricier versionOn the product pageYou pick them manually
Cross-sellsThings that go with the itemCart pageYou pick them manually
Recent productsNewest items added to your storeAnywhereAutomatic

Best Practices That Make a Real Difference

Show 4 to 6 products, not 15. Too many choices slow people down. Four is enough to jog a memory.

Hide the product they are on. Seeing the current item in its own “recently viewed” list looks broken.

Write a heading that sounds human. “Pick up where you left off” beats “Recently Viewed Products” in most tests.

Hide the section when it is empty. Never show a heading with nothing under it. First-time visitors should not see a blank box.

Match your product card design. Same image ratio, same font, same button style as your shop grid.

Keep it below the fold. This is a helper, not a headline. It should never push your add-to-cart button down.

Check it on mobile. A four-column grid becomes unusable on a phone. Use one or two columns, or a swipe carousel.

Exclude out-of-stock items if your catalog changes often. Showing a sold-out product creates a bad moment.

Frequently Asked Questions

Does WooCommerce have a recently viewed products feature by default?

Yes. It has a built-in widget called Recently Viewed Products list, under Appearance > Widgets. It shows 1 to 15 products a shopper has visited.

Why is my WooCommerce recently viewed products widget empty?

WooCommerce only tracks views when the legacy widget is active. Remove the widget and tracking stops. Page caching and testing in a fresh session are the other common causes.

How long does WooCommerce remember recently viewed products?

Only for the browser session. Close the browser and the list clears. It holds up to 15 products. Use a plugin to save history longer for logged-in users.

Is there a recently viewed products block in WooCommerce?

No. There is no block equivalent. Use the Legacy Widget block, a plugin, or a shortcode.

Can I show recently viewed products without a plugin?

Yes. Use the built-in widget, or add the Method 4 snippet to your child theme. The snippet also fixes the tracking issue.

Does it work for guests who are not logged in?

Yes. Tracking is cookie-based, so guests and logged-in customers both get it. No account needed.

What is the WooCommerce recently viewed products shortcode?

Core has none. Build your own (Method 4) or use a plugin shortcode like [rvpw_products] or [mrvp_recent_products].

Will this slow down my store?

The core widget is very light. Carousel plugins add CSS and JavaScript, so pick one that only loads on pages where the section shows.

Can I show recently viewed products on the cart page?

Yes. Add a shortcode to your Cart page, or hook it to woocommerce_before_cart. The empty cart view works well too.

Which Method Should You Pick?

Your situationUse this
Classic theme, want it done in 2 minutesMethod 1: built-in widget
Block theme, no codeMethod 3: free plugin
Want a carousel or grid anywhereMethod 3: free plugin
Heavy caching in placeMethod 3, using an AJAX-based plugin
Long buying cycle, need history to last weeksThe official WooCommerce extension or YITH

Next Step

Start with the simplest method your theme allows. Add the section to one place, not five. Give it two weeks. Then check your pages per session and add-to-cart rate.

If the numbers move, expand it to your cart page and empty cart page next. Those two spots usually deliver the most for the least effort.

author
I'm a technical content writer with a passion for simplifying complex ideas into clear, engaging content for web, email, and social media. With experience in SEO, CRM tools, and digital strategy, I've worked with RTOs, education consultancies, and global campaigns. I enjoy creating high-performing content, leading creative teams, and diving into performance analytics. Outside of work, you'll find me reading, doing photography, or hunting for the next great café spot.