Skip to content

fix: featured snippets retrieval against the snippets-only cloud response#409

Merged
imantsk merged 2 commits into
core-betafrom
fix/featured-snippets-parsing
Jun 17, 2026
Merged

fix: featured snippets retrieval against the snippets-only cloud response#409
imantsk merged 2 commits into
core-betafrom
fix/featured-snippets-parsing

Conversation

@imantsk

@imantsk imantsk commented Jun 17, 2026

Copy link
Copy Markdown
Member

Summary

Featured snippets returned empty after the cloud-app dropped the redundant data alias from search/featured responses (now snippets-only).

Cloud_API::get_featured_snippets() had its own inline parse requiring isset($json['data']), separate from the shared unpack_request_json() helper, so it returned an empty Cloud_Snippets once data was gone.

Changes

  • get_featured_snippets() now parses via unpack_request_json() (the full envelope), matching the search path.
  • Cloud_Snippets reads snippets from the snippets key only; the legacy data fallback is removed.
  • Taxonomy parsers (get_cloud_types/get_cloud_categories) are unchanged — those endpoints still return data.
  • Test fixtures for featured/search now mirror the real snippets-only response.

Verification

  • phpunit --group cloud: 30/30 pass.
  • Live against staging (snippets-only): featured returns 10/10 snippets (was 0 before the fix).

@imantsk imantsk merged commit a2df39a into core-beta Jun 17, 2026
9 checks passed
@imantsk imantsk deleted the fix/featured-snippets-parsing branch June 17, 2026 21:38
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

Successfully merging this pull request may close these issues.

1 participant