Repository navigation
fix(wp): upload custom fonts without Google Fonts lookup - #50
Merged
Merged
Conversation
The shared import handler replaced local file data with a Google Fonts request before the custom-aware uploader could run. Preserve local data and report local upload failures with the right error.
DavidBabinec
marked this pull request as ready for review
October 27, 2026 10:16
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.
Fixes #36
The bug
Adding a local font showed a Google Font download error and never reached WordPress's upload endpoint. The import handler replaced uploaded file data with a Google Fonts lookup.
The fix
Preserve custom-font file data and send it through the existing WordPress uploader. Local upload failures now show a custom-font error.
Verification
Reproduced the failure in disposable WordPress using a local WOFF2 file. After the fix, the same file uploaded, loaded in the browser, and remained available after saving and reloading. Both regression tests fail with the original handler.