Skip to content

How to remove block arguments in magento 2 using xml layouts

<?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="sales.order.items.renderers">
            <block class="MagentoSalesBlockOrderItemRendererDefaultRenderer" as="default" template="Vendor_Extension::order/items/renderer/default.phtml" name="custom_order_view_renderer"/>
             <action method="setChild">
                   <argument name="alias" xsi:type="string">default</argument>
                   <argument name="block" xsi:type="string">custom_order_view_renderer</argument>
             </action>
        </referenceBlock>

    </body>
</page>