I have Magento 2.2 and the Track Order button is not working, when I open any order and I press Track Order button I have this error:
Shipment #000000013
Fatal error: Uncaught Error: Call to undefined method Magento\Framework\Phrase::getTracking() in /home/public_html/vendor/magento/module-shipping/view/frontend/templates/tracking/details.phtml:22
Stack trace: #0 /home/public_html/vendor/magento/framework/View/TemplateEngine/Php.php(59): include() #1 /home/public_html/vendor/magento/framework/View/Element/Template.php(270): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Framework\View\Element\Template), '/home/public_ht...', Array) #2 /home/public_html/vendor/magento/framework/View/Element/Template.php(300): Magento\Framework\View\Element\Template->fetchView('/home/public_ht...') #3 /home/public_html/vendor/magento/framework/View/Element/AbstractBlock.php(667): Magento\Framework\View\Element\Template->_toHtml() #4 /home/public_html/vendor/magento/framework/View/Layout.php(558): Magento\Framework\View\Element\AbstractBlock->toHtml() #5 /home/public_html/vendor/magento/frame in /home/public_html/vendor/magento/module-shipping/view/frontend/templates/tracking/details.phtml on line 22
In that file details.phtml at the line 22 I have this code:
$number = is_object($track) ? $track->getTracking() : $track['number'];
How I can fix this?
Thanks