EDD: fix conflicting translation action for edd_variable_prices - #559
Merged
dgwatkins merged 2 commits intoAug 3, 2026
Merged
Conversation
edd_variable_prices was declared twice in <custom-fields> with contradictory actions: action="copy" and action="translate". This removes the stray action="copy" so the field is handled consistently with its identically-structured sibling edd_download_files and with every other key in a <custom-fields-texts> block across the repo: action="translate" plus a <custom-fields-texts> block that scopes translation to the "name" sub-key of each price option. This is a behaviour fix, not a no-op: price-option names become translatable. Amounts and all other sub-keys are preserved (they are not registered for translation).
dgwatkins
approved these changes
Aug 3, 2026
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.
Summary: Resolves a contradictory declaration so Easy Digital Downloads variable-price option names are translated correctly.
Problem:
edd_variable_pricesis declared twice with conflicting actions —action="copy"andaction="translate"— alongside a<custom-fields-texts>block that scopes translation to thenamesub-key. WPML can only apply one action, so the intent is ambiguous.Change: Removes the stray
action="copy", leaving a singleaction="translate"plus the existing<custom-fields-texts>block — exactly matching the identically-structured siblingedd_download_filesin the same file.Risk: Behaviour change (intended) — price-option names become translatable; amounts and all other sub-keys are preserved (not registered for translation). Backed by a repo-wide check: every
<custom-fields-texts>key pairs withaction="translate"(avada_fusion, CF7_mail/_mail_2,edd_download_files, sitepressfootnotes, Yoast_yoast_wpseo_focuskeywords) —edd_variable_priceswas the only outlier. Schema validation cannot confirm this one (bothcopyandtranslatevalidate), so correctness rests on the convention evidence. Happy for maintainers to make the final call or convert to an issue.Verified: schema passes · build-index passes · the key now resolves to a single
translate+ the texts-block · diff is one deletion.