I am trying to remove the 'Print Shipping Labels' mass action from the Sales->Shipments grid in the admin area. This grid is setup as a UI component. I have created the following blank file inside my custom extension:


I cant work out what XML is needed to remove the action. Does anyone know if its possible to remove a mass action from a uicomponent grid using XML?


This is not the best way to do this but is working:-

Create your admin theme and in that override the header.phtml file located at Custom/admintheme/Magento_Backend/templates/page

    function ($) {
        $(document).ready(function() {

            function hidePrintLabel(){

                $( "li span:contains('Print Shipping Labels')" ).css( "display", "none" );

<action name="print_shipping_label">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="type" xsi:type="string">print_shipping_label</item>
                    <item name="label" xsi:type="string" translate="true">Print Shipping Labels</item>
                    <item name="url" xsi:type="url" path="adminhtml/shipment/massPrintShippingLabel"/>

Remove or comment this action from sales_order_shipment_grid.xml

  • Im not sure editing files inside the vendor folder is the right approach unless I am missing something? Sep 28 '17 at 15:15
  • No you can use this file in your custom module : app/code/Vendor/ExtensionName/view/adminhtml/ui_component/sales_order_shipment_grid.xml Sep 28 '17 at 15:25
  • I was looking for a cleaner way to do this if possible because if the file is changed in a future upgrade then the updates will not be applied to the site. Are you not able to reply a remove flag to the action in the XML? Sep 28 '17 at 15:46

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.