Skip to content

fix: swap content/data keys in onProductOptionsChanged event detail#2640

Open
sacr3dc0w wants to merge 1 commit intobigcommerce:masterfrom
sacr3dc0w:master
Open

fix: swap content/data keys in onProductOptionsChanged event detail#2640
sacr3dc0w wants to merge 1 commit intobigcommerce:masterfrom
sacr3dc0w:master

Conversation

@sacr3dc0w
Copy link
Copy Markdown
Contributor

What?

Fixes a bug in productOptionsChanged where the content and data keys in the onProductOptionsChanged CustomEvent detail payload were swapped.

Before:

detail: {
    content: productAttributesData,
    data: productAttributesContent,
}

After:

detail: {
    content: productAttributesContent,
    data: productAttributesData,
}

productAttributesData is the structured data object returned from the optionChange API response, and should be keyed as data. productAttributesContent is the rendered template string, and should be keyed as content. Any listeners on onProductOptionsChanged expecting conventional key semantics would have received the wrong value.

Requirements

  • CHANGELOG.md entry added (required for code changes only)

Tickets / Documentation

Screenshots (if appropriate)

N/A — logic fix with no visual output.

@sacr3dc0w sacr3dc0w requested a review from a team as a code owner April 13, 2026 18:58
Copy link
Copy Markdown
Member

@rtalvarez rtalvarez left a comment

Choose a reason for hiding this comment

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

thanks for fixing this!

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