Display recently viewed products
You can use Post loop builder to show recently viewed products. Follow these steps:
Add Post loop builder
Select Query > Array
Enter this array:
return [
'post_type' => 'product',
'posts_per_page' => 4,
'meta_key' => '_last_viewed',
'orderby' => 'meta_value',
'order' => 'DESC',
];
Important part is meta_key "last_viewed".
Last updated