Suggested bug fix
-
We have been experiencing an error with this plugin that occurs whenever a WooCommerce product is not assigned to a category.
PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in […]/wp-content/plugins/official-facebook-pixel/integration/FacebookWordpressWooCommerce.php:126?
Our products are imported and available via search but not always assigned to a category.
We have a recommended change that would resolve this issue: /integration/FacebookWordpressWooCommerce.php, line 126
return count($categories) > 0 ? $categories[0]->name : null;
should be:
return ($categories && count($categories) > 0) ? $categories[0]->name : null;
- The topic ‘Suggested bug fix’ is closed to new replies.