How to remove order history tab from magento2 admin sales order view page?

I am using the following code in sales_order_view.xml

<referenceBlock name="sales_order_tabs">
    <action method="removeTab">
        <argument name="name" type="xsi:string">order_history</argument>

But, i am getting the exception like

Exception: Warning: Illegal offset type in isset or empty in /vendor/magento/module-backend/Block/Widget/Tabs.php on line 479


you need to create customer_account.xml into your module or under theme

<?xml version="1.0"?>
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <referenceBlock name="customer-account-navigation-orders-link" remove="true" />
  • I wanted to remove the tab in admin sales view section. – Sree Dec 7 '17 at 7:51
  • @Sree Better do it via ACL , that is the right way if you want to hide the menu – Vishwas Bhatnagar Dec 7 '17 at 7:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.