Skip to content

Add image support for productBrand query#1021

Merged
kidunot89 merged 2 commits into
wp-graphql:developfrom
cgarempire:add-image-support-for-productBrand-query
Jun 30, 2026
Merged

Add image support for productBrand query#1021
kidunot89 merged 2 commits into
wp-graphql:developfrom
cgarempire:add-image-support-for-productBrand-query

Conversation

@cgarempire

Copy link
Copy Markdown
Contributor

Summary

  • add ProductBrand.image as a nullable MediaItem field
  • resolve brand images from WooCommerce term thumbnail_id meta, matching existing ProductCategory.image behavior
  • add wpunit coverage for single brand and root productBrands queries

Validation

  • ProductBrandQueriesTest: OK (9 tests, 33 assertions)
  • ProductCategoryQueriesTest: OK (4 tests, 15 assertions)
  • vendor/bin/phpcs -vp .: OK
  • vendor/bin/phpstan analyze --ansi --memory-limit=4G: OK

Notes

ProductCategory.image already exists, so this PR only brings ProductBrand to parity with the existing category image field.

@cgarempire
cgarempire marked this pull request as ready for review June 29, 2026 20:50
@kidunot89
kidunot89 force-pushed the add-image-support-for-productBrand-query branch from f76ca6f to 7fbc617 Compare June 30, 2026 14:26

@kidunot89 kidunot89 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks for the contribution 🙏🏿

@kidunot89
kidunot89 merged commit 932876a into wp-graphql:develop Jun 30, 2026
21 checks passed
@kidunot89 kidunot89 added the enhancement New feature or request label Jun 30, 2026
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 28451865481

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage increased (+0.008%) to 91.809%

Details

  • Coverage increased (+0.008%) from the base build.
  • Patch coverage: 19 of 19 lines across 3 files are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 20205
Covered Lines: 18550
Line Coverage: 91.81%
Coverage Strength: 153.69 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants