-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on shop page : Expected WC_Product, got 'false' when generating ViewCategory event. #38
Comments
This is a new issue, I'll look into adding a fix for the next version. Looks like it happens for ViewCategory pixel events, where one of the products is deleted? I haven't been able to get a repro yet. |
Thank you dmitridr, that is appreciated. But it seems to be on multiple pages and Google Webmaster tools has encountered multiple of these errors. |
We weren't able to repro, but I added logic in v1.6.2 that should prevent an exception there in future versions. Thanks for reporting this! |
Handle Use Advanced Matching setting
Hello,
it seems an error is caused on many shop pages. These were picked up by Google Webmaster Tool so this is not just a manually created link.
Example url:
website.com/Shop/page/12/?orderby=price
The error is as follows:
Fatal error: Uncaught Error: Call to a member function get_sku() on boolean in /mnt/env/website/production/public_html/wp-content/plugins/facebook-for-woocommerce/includes/fbutils.php:86 Stack trace: #0 /mnt/env/website/production/public_html/wp-content/plugins/facebook-for-woocommerce/facebook-commerce-events-tracker.php(49): WC_Facebookcommerce_Utils::get_fb_content_ids(false) #1 /mnt/env/website/production/public_html/wp-includes/class-wp-hook.php(298): WC_Facebookcommerce_EventsTracker->inject_view_category_event('') #2 /mnt/env/website/production/public_html/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(NULL, Array) #3 /mnt/env/website/production/public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #4 /mnt/env/website/production/public_html/wp-content/plugins/woocommerce/templates/archive-product.php(96): do_action('woocommerce_aft...') #5 /mnt/env/website/production/public_html/wp-includes/template-loader.php(74): include('/mnt/env/goedes...') #6 /mnt/env in /mnt/env/website/production/public_html/wp-content/plugins/facebook-for-woocommerce/includes/fbutils.php on line 86
Is this a known issue and is there a fix for this?
The text was updated successfully, but these errors were encountered: