TRAC-366: audit and fix Stencil theme remote API calls for multi-language subfolder support#241
Merged
bc-yevhenii-buliuk merged 1 commit intomasterfrom Apr 8, 2026
Merged
Conversation
0a17348 to
c4604b7
Compare
c4604b7 to
d98e70b
Compare
d98e70b to
f8b0854
Compare
funivan
approved these changes
Apr 7, 2026
f8b0854 to
a954e56
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a954e56. Configure here.
a954e56 to
2d65859
Compare
rtalvarez
approved these changes
Apr 8, 2026
…-language subfolder support
2d65859 to
d3eaf6b
Compare
Contributor
|
🎉 This PR is included in version 6.23.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Jira: TRAC-366
What/Why?
This PR adds optional requestOptions param to
optionChange(),configureInCart(), andgetShippingQuotes()for multi-lang subfolder support.BigCommerce supports multi-language via URL subfolder locales (e.g.
/es,/fr). When a shopper is onsite.com/es, AJAX requests must include the/esprefix so the server returns translated content (option names, availability messages, shipping quotes HTML, etc.).Previously these methods ignored any requestOptions passed from the theme, making it impossible to forward
baseUrlfrom the theme context. As a result, requests were sent to the non-prefixed remote endpoints and the server returned untranslated content.Affected methods and endpoints
getItemGiftWrappingOptions()required no changes — it already forwards the entire options object to the request layer, so{ template, baseUrl }from the theme works without modification.Rollout/Rollback
revert the PR
Testing
testing bundle on employee store
before:

PDP -> productOptionsChangedcart -> configureInCartcart -> optionChangecart -> getItemGiftWrappingOptionsafter:

PDP -> productOptionsChangedcart -> configureInCartcart -> optionChangecart -> getItemGiftWrappingOptionsNote
Medium Risk
Updates public API method signatures and argument-shifting behavior for remote requests; risk is mainly backward-compatibility/edge cases in optional-argument parsing affecting shipping quotes and product option updates.
Overview
Fixes remote API helpers to preserve and forward
requestOptions(notablybaseUrlfor multi-language subfolder URLs) when callingCartApi.getShippingQuotesandProductAttributes.optionChange/configureInCart.Adds/updates Jest coverage to validate the new optional-argument shifting and that
template,params, andbaseUrlare merged correctly without being dropped or overwritten.Reviewed by Cursor Bugbot for commit d3eaf6b. Bugbot is set up for automated code reviews on this repo. Configure here.