How to Display WooCommerce Products Previously Purchased by Current User

By Updated: October 26, 2019 4

If you want to use WooCommerce to display products previously ordered by the current logged in user, you’ve come to the right place! We’ve just released a new version of our bestselling WooCommerce Product Table plugin which lets you show each user a list of products and variations they have previously purchased.

WooCommerce display previous orders by logged in user plugin

WooCommerce Display Products Previously Ordered by UserThere are lots of reasons to list products that the user has already bought:

  • Display purchased products in My Account You may wish to display all products ordered by the current user so they can see everything in one place.
  • Quick re-order table List the user’s previous products in a quick one-page order form, so they can quickly find and select items to re-order.
  • List favorite products Most customers who make repeat purchases have favorite items that they buy multiple times. Make it easier for existing customers to find and re-purchase their regular products.

Whatever your reasons, keep reading to learn how to use WooCommerce to display purchased items only.

WooCommerce Product Table
The easy way to show the user's previously ordered items in WooCommerce.

The easy way to display products previously ordered by user

Until now, there were no WordPress plugins that could list products previously bought by the that the current logged in user. You can now do this with our WooCommerce Product Table plugin, which lists any type of products in a searchable table or quick one-page order form:

Show WooCommerce products previously ordered

You can use the plugin to list any or all of your products anywhere on your WordPress site. It has a feature which lets you show products previously ordered by the current user. When you activate this feature, it works like this:

  1. Depending on how you set it up, customers can either login to their WooCommerce account, or view a dynamic ‘My Previous Products’ page which shows different products depending on the user. The page would include a WooCommerce Product Table listing all products previously ordered by that user.
  2. If the user has never ordered any products from your WooCommerce store, then they will see a customizable message saying that there are no products in the table.

Why this is different from listing previous orders

The WooCommerce Account page already lists previous orders like this:

WooCommerce Account Page List Orders

As you can see, the default list of orders doesn’t make it easy for customers to repeat an order or re-order products. You can click on an order to view more information. From there, you can click through to the single product page to re-order each product. That’s a lot of clicks if you want to re-order products you have previously purchased! You don’t know which order contains the product you want to re-order. As a result, it’s easy to get lost.

Why WooCommerce Product Table is different

WooCommerce Product Table makes re-ordering much faster and simpler. It automatically lists the products that the current logged in user has previously purchased.

This is different from listing previous orders, because the list isn’t structured by order. Instead, the WooCommerce table displays all products that the customer has ever ordered. It lists each previous product only once, even if the user has ordered it multiple times before.

The user can view the list of products previously ordered, search/sort/filter the list as needed to quickly find what they want to re-order, tick the relevant products and add them to the cart. They can then click through to the WooCommerce cart and checkout as usual.

Next, I’ll tell you how to set it up on your own WordPress WooCommerce website. The lists of previous orders are generated automatically, making it surprisingly easy to set up!

Why it’s different from a WooCommerce Repeat Orders plugin

You might have read about WooCommerce re-order plugins. These simply adds an ‘Order Again’ button to the list of orders in the WooCommerce Account. They’re different from the method described in this tutorial because instead of duplicating a previous order, WooCommerce Product Table displays products previously purchased by the user who is currently logged in. 

The customer doesn’t have to remember which order their previous products related to. They just need to use the search, sort and filter functions to quickly find their favorite products. Then, they simply add them to the cart and create a brand new order.

Now you know why you should be letting existing customers re-order from a list of their previous products. Next, we’ll get into the most important part of this tutorial – how to set it up.

How to display products previously ordered by current logged in user

First, I’m going to tell you how to show products previously ordered by the current user on any page. Afterwards, we’ll look at specific places on your site where you might want to display this list. For example, you can add a ‘My Products’ section to the WooCommerce Account page, or create a hidden page that only logged in users can see.

1. Install WooCommerce Product Table

  1. Get WooCommerce Product Table and install it on your WordPress site (Plugins → Add New).
  2. Head to WooCommerce → Settings → Products → Product tables.
  3. Enter and activate your license key.

2. Configure your product table settings

WooCommerce Product Table plugin settings page
Now, go through the settings page and choose how you want your product tables to work. Here are my recommendations on the best settings for listing previously ordered products:

  • Choose your columns – When listing previously ordered products, I recommend keeping your columns simple. Just display factual data about each product, such as a thumbnail image, name, and price. Don’t include more general information such as the description, as the user is already familiar with the product. You should almost certainly include an add-to-cart column because this allows users to re-order the product directly from the list. (Read full instructions)
  • Quantity inputs – You should generally tick this box because it allows users to select a quantity before adding it to the cart.
  • Add to cart button – If you’re creating a quick re-order form then I generally recommend selecting the ‘Checkbox’ option. This adds multi-select tick boxes instead of standalone add to cart buttons for each product.
  • Product variations – It’s generally best to select the ‘Dropdown’ option so that users can choose variations from the list of previously ordered products. Alternatively, choose ‘Separate’ to list each variation on its own row.

Keep going…

  • Search filters – If some customers have ordered a large number of products from you, then add some filter dropdowns to make the products easier to find. You can even help customers to find specific products more easily by adding a search box and filters. This is essential for users with a large order history. (Tip: The plugin also comes with filter widgets.) (Read full instructions)
  • Lazy load – Since you don’t know how many products each user has previously ordered, there’s a chance that some of them might list large numbers of products. Enable the lazy load option to avoid any performance problems for larger tables.
  • Caching – Disable this when listing a user’s previously products. It’s essential to load the list of products separately for each user because a cached version might show other user’s products!
  • Search box – Enable this to add a keyword search above the table, helping users to find their favorite products more easily.
  • Links – Consider whether or not you want people to be able to click from the list of previous products to the single product page. If not, enter false here to disable the links. This keeps the user on the quick re-order form.

3. Use a shortcode to display previous products

Now, we get to the fun bit! It’s time to list products ordered by the current logged in user. We’ll do this by adding a simple shortcode to any page on your WordPress website:

[product_table user_products="true"]

View the page. If you’re logged in as a user who has previously placed an order, you’ll see all the previously ordered products listed in a neat product table layout:

WooCommerce previously ordered products plugin

4. Decide where to put the list of previous products

Now you’ve successfully listed products previously ordered the current user, it’s time to decide how this fits into the overall structure of your website. How will logged in users find their products?

There are two ways to do this:

  1. Add a ‘My Products’ section to the WooCommerce Account page
  2. Create a hidden page that only logged in users can see

I’ll show you how to set up either option.

Option 1: List previously ordered products on the Account page

The WooCommerce account page is the most obvious place to list the user’s previously ordered products. For example, you can add a ‘My Products’ tab to the Account area.

You can easily do this with IconicWP’s WooCommerce Account Pages plugin:

  1. Install the plugin.
  2. Go to the list of ‘Pages’ in the WordPress admin and click ‘Quick Edit’ on the page where you added the shortcode to show the logged in user’s previous products.
    Add extra tab to WooCommerce account page
  3. Select ‘My Account’ as the parent page and click ‘Update’.

This will add a new link to the list of tabs within the WooCommerce My Account page. The tab will have the same name as the page, for example ‘My Products’. When users log in and click on the link, they will see the list of products they previously purchased:

Option 2: List previously ordered products on a hidden page

Alternatively, you might want to structure the list of previously ordered products outside of the Account area. To do this, you need another method for restricting the page so that only logged in users can see it.

Keeping the page away from the Account area gives you slightly more flexibility. For example, it makes it easier to choose a different page layout and add filter widgets to the sidebar, as you’re not restricted by the layout of the account page.

You can hide the page using the free Restrict User Access plugin:

  1. Install Restrict User Access on your WordPress site.
  2. Go to User Access → Add New.
  3. Click ‘+ New Condition Group’ and select ‘Pages’. Click in the ‘All Pages’ box that appears below.
    Add New Access Level
  4. Select the page where you’ve added the shortcode to list the current user’s previous products.
  5. Now go to the ‘Members’ tab and select the ‘Logged-in’ role. (Or, if you prefer, select the ‘Customer’ role so that only logged in customers can see the page.)
    Restrict WordPress page to logged in users
  6. Use the ‘Options’ tab to choose what happens if a guest or logged out user tries to access that page for any reason – for example, because they have bookmarked it.
  7. Click the blue ‘Create’ button.

Now, only logged in users with the role you selected will be able to access the page where you’ve added the product table shortcode. Each logged in user will only see the products that they have previously purchased.

Add the hidden page to the menu

Of course, your users need an easy way to find the list of products they have previously purchased. You can do this by adding a menu link that only logged in users can see:

  1. WordPress menu link logged in users
    Go to Appearance → Menus.
  2. Select the page from the list of Pages on the left, and click ‘Add to Menu’.
  3. Click on the little arrow in the menu on the right. This will open up extra options for that menu item.
  4. Use the ‘Access Levels’ option to select which user role(s) can see the menu link.

Can I display order information in the table?

WooCommerce Product Table is all about listing products so that the customer can re-order them. You can display any type of information about the products, such as the image, name, short or long description, price, categories, tags, attributes, and much more. However, it’s not possible to display order information alongside each product, such as the date the product was last ordered.

This is because orders are stored as a separate post type in WooCommerce. Even though you’re listing products previously ordered by the current user, the order information is not stored against these products in the WordPress database.

If the customer wants to access their order history, then they can do this on the WooCommerce Account page. This works nicely alongside the list of previously purchased products.

Can I show previously ordered variations?

When you use WooCommerce Product Table to display products that the user has previously purchased, this includes variable products. If the user previously ordered a product variation, then this product – along with its variations – will appear in the table.

For example, the following screenshot shows what it might look like if the current user had previously ordered 3 variable products. As you can see, all variations for each product (not just the ones that you have previously purchased) are listed as dropdowns next to the add to cart button. The user can select whichever variations they want to buy, and add them to the cart.

Previously Ordered Variations WooCommerce

In this example, the first and third products have no default variations, so the variation dropdowns are not pre-selected. The second product has a default variation of Black Small, which is selected by default. You can set default variations on the ‘Edit Product’ screen.

Bonus tips

Choose which types of product to include

So far, we’ve assumed that you want to list ALL products that the current user has ever ordered. If you prefer, you can have more control over which products to include.

WooCommerce Product Table comes with lots of options for displaying specific products only. In addition to setting it to only show products ordered by the current user, you can choose to list products from a specific category, tag, search keyword, and much more.

For example, you might like to create multiple tables listing items that the user has ordered from specific category. If you sell clothing and jewellery, then the ‘My Products’ page might include one product table listing purchased products from the clothing category; and another product table from the jewellery category. If you stock a wide range of items, then this can be more intuitive for your customers.

Customize the message for users with no previous orders

If a user with no previous orders sees the product table, then they will see a message. By default, it looks like this:

WooCommerce product table no products message

I recommend customizing this message to make it more relevant to previous products. For example:

[product_table user_products="true" no_products_message="You haven't ordered any products yet! Place your first order, and then your products will appear here."]
User previous orders no products message

Use quick view to speed up re-ordering

WooCommerce Product Table Quick View Magnifying Glass
You have full control over which columns of product data to include in the table. Customers can choose quantities and variations from the add to cart column of the table, achieving true one-page ordering.

However, there are situations where you might want to show more information, or if you have too many variations to fit into the product table. If that applies to you, then quick view is the solution.

The WooCommerce Product Table plugin is designed to work alongside its sister plugin, WooCommerce Quick View Pro. Use them together to add quick view buttons to the table. Shoppers click on these to view more product information in a quick view lightbox. Depending on which settings you choose, this might include the full product image gallery, short description, and add to cart options with variation dropdowns.

WooCommerce Quick View Lightbox with Product Variations

Get Quick View

Review: How Pete Griffith lists his customer’s favorite products

Before we close, let’s look at a real user of WooCommerce Product Table. Pete Griffith uses the plugin to allow regular customers to order their favorite products more easily each week:

Great Plug-in, Awesome Developer.
By Pete Griffith
This plugin was almost exactly what my customers were asking me to do to make ordering products on a weekly basis much more convenient. Instead of having to wade through our entire catalog of products, they can have a customized order form of only the products they order on a regular basis. They can still access the other products, if their needs change, of course, but this is much more user friendly for them (and me) than the default shopping method on WooCommerce. I had a question for the developer when setting it up, and was amazed at the speed of their response, the depth of understanding of my issue and the amount of time they must have spent in researching the answer. This is the second plugin we've purchased from them and it is because of Katie's blog articles that we knew about it and how we could use it to solve our problem. Her articles are written from the user's point-of-view and give working solutions to some real-world problems that WooCommerce users face. My wish list for future improvement: Add the ability to limit the variable products to selected varieties. I have one popular product with 50+ flavors, but most of my regular customers only order a few of the flavors on a weekly basis. Having all 50+ flavors is not ideal, and while I've devised a sort of workaround for some clients, it would be best if the plugin could handle this itself (each variety has its own product id, so implementing the shortcode would be simple for me or any other WC user if they do add this feature down the road). Highly recommend this plugin and this developer's other products.

Where to get the plugin

WooCommerce Product Table is the perfect solution to display specific products based on the logged in user’s past orders.

It makes it much faster for existing customers to login and view a list of products they have previously ordered. They can quickly select the ones they want to re-order, and instantly add their favorite products to the cart.

WooCommerce Product Table
Get the plugin today and start displaying your logged in users' previous products.

Katie Keith

An active member of the global WordPress community, Barn2 Co-Founder Katie loves collaborating with other plugin companies. Her articles have been published on high profile sites including WPTavern, Torque and IndieHackers. She oversees all plugin support and deals with 'Tier 2' support requests about how to use Barn2's plugins in advanced ways.

4 Comments

  1. tim
    August 19, 2019 Reply

    yes I would like this feature as well! We would definitely order this plugin when this feature is included.

    • EJ
      August 19, 2019 Reply

      Hi, Tim. Thanks for letting us know! I have added your "vote" for this feature and we will let you know if we add this in future. Many thanks.

  2. mirko terranova
    June 10, 2019 Reply

    hi, you can request a plugin change to add a filter to the products table for display products previously ordered by user

    • EJ
      June 10, 2019 Reply

      Hi, Mirko. Thanks for submitting a Feature Request to display products previously ordered or purchased. I added your ‘vote’ for this feature when you submitted a Plugin Feature Request Form the other week. We will let you know if we add this in future.

Please share your thoughts...

Your email address will not be published.