In additon to elisolution's solution previously mentioned, this also checks whether or not we are literally on the home page (not simply whether the canonical was established or not). I examined this solution a little bit and as far as I can see, it works as predicted. Or else, you should https://addons.prestashop.com/de/seo-suchmaschinenranking-optimization/31857-automatische-google-rich-snippets-json-ld-opengraph-seo.html