public function getProduct()
    {
        if (!$this->hasData('product')) {
            $this->setData('product', $this->_coreRegistry->registry('product'));
        }
        return $this->getData('product');
    }
public function getProduct()
    {
        if (!$this->hasData('product')) {
            $this->setData('product', $this->_coreRegistry->registry('product'));
        }
        return $this->getData('product');
    }
public function getProduct ( ) { if ( ! $ this -> hasData ( 'product' ) ) { $ this -> setData ( 'product' , $ this -> _coreRegistry -> registry ( 'product' ) ) ; } return $ this -> getData ( 'product' ) ; }
Retrieve currently viewed product object

@return \Magento\Catalog\Model\Product
Retrieve currently viewed product object