Files
peptide-repo-core/includes
peptiderepo bb3967a071 fix(repo): drop stale TAX_FAMILY references (v0.2.1 P1 hotfix) (#2)
v0.2.0 removed TAX_FAMILY from PR_Core_Peptide_CPT but left two stale
references in PR_Core_Peptide_Repository:
  - find_all() family filter branch (class-pr-core-peptide-repository.php:95-102)
  - post_to_dto() families taxonomy lookup (class-pr-core-peptide-repository.php:138)

JSON-LD emission on single-peptide templates called find_by_id() ->
post_to_dto() which hit the undefined constant and killed every peptide
detail page render mid-wp_head().

Fix:
  - family filter is silently ignored until a future minor bump
    removes it from the REST schema.
  - post_to_dto() hardcodes $families = [] so the DTO still carries
    the field (REST response shape unchanged for existing clients).

Out-of-scope follow-ups:
  - Post-mortem on why the v0.2.0 QA gate missed this (unit tests
    exercised the CPT class in isolation, not the repository's
    consumption of its constants).
  - Add an integration-style test for JSON-LD emission on a single
    peptide so any future CPT-class refactor catches repository drift.

Co-authored-by: peptiderepo <peptiderepo@users.noreply.github.com>
2026-04-22 16:56:42 +07:00
..