Skip to content
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

PHP Warnings Spam at Cron #1688

Closed
yward opened this issue Nov 10, 2020 · 1 comment
Closed

PHP Warnings Spam at Cron #1688

yward opened this issue Nov 10, 2020 · 1 comment

Comments

@yward
Copy link

yward commented Nov 10, 2020

The plugin is throwing plenty of PHP warnings each cron job as follows:

Invalid argument supplied for foreach() in /dir-to-website-root/public_html/wp-content/plugins/facebook-for-woocommerce/includes/fbproduct.php on line 673, referer: https://yourwebsite/wp-cron.php?doing_wp_cron=160502954XXXXXXXXXX2510986XXXXX50

The culpirt code is here:


foreach ( $all_attributes as $attribute ) {
				$value = Products::get_enhanced_catalog_attribute( $attribute['key'], $this->woo_product );

				if ( ! empty( $value ) &&
					$category_handler->is_valid_value_for_attribute( $google_category_id, $attribute['key'], $value )
				) {
					$enhanced_data[ $attribute['key'] ] = $value;
				}
			}

I suspect this issue is related to the previous issue with google catalouge attributes which was fixed in the latest version:
Ref: #1674

@budzanowski
Copy link
Collaborator

Should be fixed with #1820 and released soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants