private function renderProductPrice(\Magento\Catalog\Model\Product $product, $priceCode)
    {
        $priceRender = $this->getPriceRenderer();

        $price = $product->getData($priceCode);

        if ($priceRender) {
            $price = $priceRender->render(
                $priceCode,
                $product,
                [
                    'include_container' => false,
                    'display_minimal_price' => true,
                    'zone' => Render::ZONE_ITEM_LIST,
                    'list_category_page' => true,
                ]
            );
        }

        return $price;
    }
private function renderProductPrice(\Magento\Catalog\Model\Product $product, $priceCode)
    {
        $priceRender = $this->getPriceRenderer();

        $price = $product->getData($priceCode);

        if ($priceRender) {
            $price = $priceRender->render(
                $priceCode,
                $product,
                [
                    'include_container' => false,
                    'display_minimal_price' => true,
                    'zone' => Render::ZONE_ITEM_LIST,
                    'list_category_page' => true,
                ]
            );
        }

        return $price;
    }
private function renderProductPrice ( \ Magento \ Catalog \ Model \ Product $ product , $ priceCode ) { $ priceRender = $ this -> getPriceRenderer ( ) ; $ price = $ product -> getData ( $ priceCode ) ; if ( $ priceRender ) { $ price = $ priceRender -> render ( $ priceCode , $ product , [ 'include_container' => false , 'display_minimal_price' => true , 'zone' => Render :: ZONE_ITEM_LIST , 'list_category_page' => true , ] ) ; } return $ price ; }
Renders product price.

@param \Magento\Catalog\Model\Product $product   The product
@param string                         $priceCode The Price Code to render

@return string
Renders product price .