Skip to content

fix(publish): Use correct parameter name when assigning taxonomies#945

Merged
chubes4 merged 1 commit intoExtra-Chill:mainfrom
saraichinwag:main
Mar 23, 2026
Merged

fix(publish): Use correct parameter name when assigning taxonomies#945
chubes4 merged 1 commit intoExtra-Chill:mainfrom
saraichinwag:main

Conversation

@saraichinwag
Copy link
Contributor

Fixes a bug where tags were never assigned when 'ai_decides' was configured.

Problem

The WordPress publish handler was checking $parameters[$taxonomy] where $taxonomy is the taxonomy name (e.g., 'post_tag'), but the AI tool parameter name is mapped differently (e.g., 'post_tag' -> 'tags').

This caused tags to never be assigned because the handler looked for $parameters['post_tag'] when the AI actually sent $parameters['tags'].

Changes

  • Make TaxonomyHandler::getParameterName() public static
  • Use getParameterName() in WordPress.php to get correct parameter key

Impact

Fixes missing tag assignment when using ai_decides taxonomy selection for post_tag and other non-hierarchical taxonomies.

The WordPress publish handler was checking $parameters[$taxonomy] where
$taxonomy is the taxonomy name (e.g., 'post_tag'), but the AI tool parameter
name is mapped differently (e.g., 'post_tag' -> 'tags').

This caused tags to never be assigned when 'ai_decides' was configured,
because the handler looked for the wrong parameter key.

Changes:
- Make TaxonomyHandler::getParameterName() public static
- Use getParameterName() in WordPress.php to get correct parameter key

Fixes missing tag assignment when using ai_decides taxonomy selection.
@chubes4 chubes4 merged commit 3a91e4a into Extra-Chill:main Mar 23, 2026
1 check failed
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.

2 participants