Use the PersonalizeWP Product Collection block to show WooCommerce products based on what a visitor has browsed. Add the block in the WordPress Block Editor on a site with WooCommerce and the PersonalizeWP product recommendations feature enabled.
Choose a collection
- Previously Viewed Products shows products the visitor has recently browsed.
- Products For You recommends products based on visitor behavior and relevant products.
Add the block to a page
- Open the page in the WordPress Block Editor. In the block inserter, search for Product Collection and select the PersonalizeWP block.
- Choose Previously Viewed Products or Products For You. Use the block settings to adjust how the products display.
- Set the fallback for visitors without matching products. You can show all products, hide the block or show a custom message.
- Check the published page in a fresh browser session. View a few products and return to the page to see how the collection changes.
Build a custom implementation
For more control, see the advanced guides to creating a Previously Viewed Product block and creating a Products For You block with the REST API.