class Product extends \Magento\Framework\View\Element\Template {

    protected $_productloader;

    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Catalog\Model\ProductFactory $_productloader

    ) {
        $this->_productloader = $_productloader;

    public function getLoadProduct($id) {
        return $this->_productloader->create()->load($id)


I get "Reference Entity Deprecated" on load() method so what is the best practice to use load() functionality.

Your Answer

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

Browse other questions tagged or ask your own question.