Hello Magento Friends,

The current Magento tutorial blog illustrates How to Get Wishlist Data Using Customer ID in Magento 2.

Wishlist is a useful tool to help customers save their favorite items for future purchases. Learn How to Configure Wishlist in Magento 2.

The customer’s wishlist items are linked using the customer ID. To retrieve a customer’s wishlist items, you need the customer ID to filter the wishlist collection by the corresponding customer. The customer ID serves as a unique identifier to fetch the wishlist items associated with that specific customer.

Using the below step, you can get wishlist data, including product ID and quantity of product from customer ID in Magento 2.

Steps to Get Wishlist Data Using Customer ID in Magento 2:

Step 1: Create Data.php on the given path.


Then add the code as follows.

You can use this method in the controller file or block file as per your requirement.


Hence, using the above method, you can easily get wishlist data of customers using the customer ID in Magento 2. If you face any errors while implementing the above code, kindly share them with me through the comment section.

Share the article through social media platforms and with your other Magento friends. Stay in touch with us for more.

Happy Coding!

Click to rate this post!
[Total: 1 Average: 5]