has_schema_type( 'Product' ) ) { $score += 30; $found[] = __( 'Schema type is Product.', 'aeomatic' ); } else { $missing[] = __( 'No Product schema.', 'aeomatic' ); $recommendations[] = __( 'Set schema type to Product for pages describing a physical or digital product.', 'aeomatic' ); } if ( $signals->has_woocommerce_product() ) { $score += 20; $found[] = __( 'WooCommerce product detected.', 'aeomatic' ); } if ( $signals->schema_override( 'offers' ) || $signals->schema_override( 'price' ) ) { $score += 15; $found[] = __( 'Price / offers schema property set.', 'aeomatic' ); } else { $missing[] = __( 'No price / offers property.', 'aeomatic' ); $recommendations[] = $signals->is_block_editor() ? __( 'Fill the price or offers property in the Schema Generator sidebar.', 'aeomatic' ) : __( 'Set the price or offers property on this page\'s Product schema — open the AEOmatic schema editor (the Classic Editor metabox, or the AEOmatic button inside your page builder).', 'aeomatic' ); } $has_sku = $signals->schema_override( 'sku' ) || $signals->schema_override( 'mpn' ) || (bool) preg_match( '/\b(SKU|MPN|Model)[\s:]*[A-Z0-9-]{3,}/i', $signals->content_plain() ); if ( $has_sku ) { $score += 15; $found[] = __( 'SKU / MPN / model number detected.', 'aeomatic' ); } else { $missing[] = __( 'No SKU / MPN / model number.', 'aeomatic' ); $recommendations[] = __( 'Include SKU or model number — AI shopping engines and rich results rely on these identifiers.', 'aeomatic' ); } if ( $signals->has_heading_keyword( array( 'features', 'specifications', 'specs', 'what\'s in the box', 'included', 'product details' ) ) ) { $score += 20; $found[] = __( 'Product-context heading detected.', 'aeomatic' ); } else { $missing[] = __( 'No product-context heading (features / specs / details).', 'aeomatic' ); $recommendations[] = __( 'Use H2s like "Features" or "Specifications" — AI product answers pull from these.', 'aeomatic' ); } $detected = $score >= AEOMATIC_Entity_Scanner::detected_threshold(); return new AEOMATIC_Entity_Detection_Result( 'product', $detected, $score, $found, $missing, $recommendations ); } }