In this post I am going to explain how to get customer order collection by customer id in Magento 2. Using below code snippet you can get customer order data by passing customer id. 1. Using Dependency Injection Add below code snippet in Block class. protected $_orderCollectionFactory; public function __construct( \Magento\Framework\View\Element\Template\Context $context, \Magento\Sales\Model\ResourceModel\Order\CollectionFactory $orderCollectionFactory,…


Recent Comments