diff --git a/includes/fbproduct.php b/includes/fbproduct.php index c8ba39541..5c05e6b06 100644 --- a/includes/fbproduct.php +++ b/includes/fbproduct.php @@ -1316,6 +1316,10 @@ private function apply_enhanced_catalog_fields_from_attributes( $product_data, $ $all_attributes = $category_handler->get_attributes_with_fallback_to_parent_category( $google_category_id ); + if ( empty( $all_attributes ) ) { + return $product_data; + } + foreach ( $all_attributes as $attribute ) { $value = Products::get_enhanced_catalog_attribute( $attribute['key'], $this->woo_product ); $convert_to_array = (