Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
phpcs.xml
WRONG-PLAN-FIX-PLAN.md
docs/
endpoint/

4 changes: 2 additions & 2 deletions src/LicenseHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* - Uses the Hub_Manager cache for zero-extra-API-call license checks.
* - Auto-migrates legacy per-plugin keys from addon settings.
*
* @version 2.1.0
* @version 2.1.1
*/
class LicenseHandler {

Expand Down Expand Up @@ -59,7 +59,7 @@ class LicenseHandler {
*
* @var string
*/
private $version = '2.1.0';
private $version = '2.1.1';

/**
* WP Override flag
Expand Down
4 changes: 4 additions & 0 deletions src/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
= 2.1.1 =
- FIX: "Save License Keys" button did nothing — the tab script intercepted its click (shared .gwp-tab class) and cancelled the form submit. Tab handler now only binds to real tabs.
- FIX: "Update available" notice stayed on a plugin card after a successful AJAX update. It's now removed once the update succeeds.

= 2.1.0 =
- NEW: Centralized Hub system — single API request returns license info + ALL plugins data.
- NEW: Support for both Global License Key (All Access, List Add-ons, Agency) and Individual Plugin Keys (Single Add-ons).
Expand Down
16 changes: 16 additions & 0 deletions src/shared/assets/js/gwp-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@
}

tabs.forEach( function ( tab ) {
// The Save button shares the .gwp-tab class for styling but has no
// data-gwp-tab attribute — it must perform its native form submit,
// not be intercepted as a tab.
if ( ! tab.hasAttribute( 'data-gwp-tab' ) ) {
return;
}
tab.addEventListener( 'click', function ( e ) {
e.preventDefault();
setActiveTab( tab, tabs, panels );
Expand Down Expand Up @@ -326,6 +332,16 @@
if ( footer && payload.data && payload.data.footer_html ) {
footer.innerHTML = payload.data.footer_html;
}
// Update succeeded — drop the now-stale "Update available" notice
// from the card header (the AJAX response only re-renders the
// footer, not the header).
if ( action === 'update' && footer ) {
var card = footer.closest( '.gwp-plugin-card' );
var notice = card && card.querySelector( '.gwp-plugin-card__update-notice' );
if ( notice ) {
notice.remove();
}
}
} )
.catch( function ( err ) {
btn.disabled = false;
Expand Down
2 changes: 1 addition & 1 deletion src/shared/assets/js/gwp-admin.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.