Skip to content

How can I reference an extension block to another block on magento

How can I reference the block of this catalog_product_view.xml file:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="amasty_product_component"/>
<body>
    <referenceContainer name="product.info.form.content">
        <block class="AmastyRecurringPaymentsBlockProductViewRecurringPayments"
               name="product.info.recurring.payments"
               before="product.info.addtocart"
               template="Amasty_RecurringPayments::product/view/subscriptions.phtml"/>
    </referenceContainer>
    
</body>

to this file:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="amasty_product_component"/>
<update handle="customer_account"/>
<body>
    <referenceContainer name="content">
        <block class="MagentoCookieBlockRequireCookie" name="require-cookie" template="Magento_Cookie::require_cookie.phtml">
            <arguments>
                <argument name="triggers" xsi:type="array">
                    <item name="addToWishlistLink" xsi:type="string">.action.towishlist</item>
                </argument>
            </arguments>
        </block>
        <referenceBlock name="category.product.addto">
            <block class="MagentoWishlistBlockCatalogProductProductListItemAddToWishlist"
                   name="category.product.addto.wishlist" as="wishlist" before="compare"
                   template="Magento_Wishlist::catalog/product/list/addto/wishlist.phtml"/>
        </referenceBlock>   
    </referenceContainer>
    
</body>