How to fetch user order history programmatically in a custom module via $this->context?
$this->context->link->getOrderHistory(); ???
How to fetch user order history programmatically in a custom module via $this->context?
$this->context->link->getOrderHistory(); ???
You can use the static getCustomerOrders function from the Order class:
Order::getCustomerOrders((int)$this->context->customer->id))
It will return an array of the customer orders