QuestionQ54Verified/Working with AdminCopy linkReport a problemAsk AstroTutorSave questionHow may a developer override a method of a core class in Adobe Commerce?A<preference for=“Magento\Catalog\Block\Product” type=“Vendor\Module\Block\Product” />BCShow AnswerAnswerExplanationAdobe Commerce dependency injection supports preferences that substitute a custom class for a core class. A preference mapping from Magento\Catalog\Block\Product to Vendor\Module\Block\Product causes the custom implementation, including its overridden methods, to be used.Show comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion