Update theme updates UI#498
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses a regression in the admin Themes update flow by restoring the visibility of the “Update now” UI and making theme package downloads more robust (including fallback retrieval of package URLs).
Changes:
- Adds
wpbdp-inline-noticeto the theme update notice markup so the update UI is visible again. - Ensures version info returned by the licensing layer exposes a
download_link(mapped frompackage) to support theme downloads. - Refactors the theme update process to derive a download URL more reliably, download the package, validate it’s a ZIP, and then install via the Themes API.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
templates/admin/themes-item.tpl.php |
Adjusts theme update notice classes to restore update UI visibility. |
includes/licensing.php |
Adds download_link to update payloads (mapped from package) for downstream consumers. |
includes/admin/controllers/class-themes-admin.php |
Implements download URL retrieval + ZIP validation and updates the theme update/install flow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR refactors the theme update mechanism to streamline package download and installation. It introduces EDD API integration for resolving package URLs, adds ZIP validation before installation, simplifies the update flow by delegating to WordPress theme installers, and updates the licensing API response to include download links. The update notice styling is also enhanced with additional CSS classes. ChangesTheme Update Flow Refactoring
🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
fixes https://github.com/Strategy11/business-directory-premium/issues/350
This PR updates the UI so that the update button is visible again and fixes the download process for the thems