Remove Recently Ordered Block from Sidebar in Magento 2

0
7356
Remove Recently Ordered Block from Sidebar in Magento 2
Remove Recently Ordered Block from Sidebar in Magento 2

Under customer account sidebar navigation, by default, there is a recently ordered block which helps customer to quickly reorder previous items. Sometimes, you might want to hide it for the theme. I will show you how to remove recently ordered block from sidebar in Magento 2.

To remove the recently ordered block from sidebar, you need to update the layout of the customer page, let say, just apply it to default.xml like following:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="sale.reorder.sidebar" remove="true"/>
    </body>
</page>

Then refresh the page, you will see the recently ordered block is removed from sidebar in customer account page.

Have fun ~