Hello @maxplateau, thanks for getting in touch and for sharing the fatal error you’re seeing. I’d be happy to look deeper into this for you from a Site Kit perspective. To do this, please can you first share the following information:
- Your Site Health information. You can use this form to share privately if preferred.
- At what stage do you encounter this? For example is this when navigating to the Site Kit dashboard?
- Does the same error display when following the troubleshooting steps here and in troubleshooting mode with just Site Kit and WooCommerce active?
Once you have shared this information, I can review to get a better idea of what may be happening. I will then ask for further information or suggest some next steps for you to take.
My issue is the same as this one here:
https://github.com/google/site-kit-wp/issues/11049
To fix the issue, I have added this code at the top of get_formatted_product() function:
$product = wc_get_product( $product );
if ( ! $product || ! $product instanceof WC_Product ) { return array(); }
@maxplateau Thanks for clarifying this and thanks for sharing your fix for the issue. You can continue to follow the GitHub issue for updates but in the meantime, is there anything else we can help you with?