Update elementor pro

This commit is contained in:
2026-03-24 09:23:15 +01:00
parent ce2d93a202
commit 4c35d65901
559 changed files with 11981 additions and 19280 deletions

View File

@@ -12,6 +12,7 @@ export default class Module extends elementorModules.Module {
onInit() {
this.assignMenuItemActions();
this.assignProLicenseActivateEvent();
}
assignMenuItemActions() {
@@ -30,4 +31,31 @@ export default class Module extends elementorModules.Module {
} );
} );
}
assignProLicenseActivateEvent() {
window.addEventListener( 'DOMContentLoaded', () => {
const activateButton = document.querySelector( '.button-primary[href*="elementor-connect"]' );
if ( activateButton ) {
activateButton.addEventListener( 'click', () => {
if ( ! window.elementorCommon?.config?.experimentalFeatures?.editor_events ) {
return;
}
const eventsManager = window.elementorCommon?.eventsManager || {};
const dispatchEvent = eventsManager.dispatchEvent?.bind( eventsManager );
const eventName = 'pro_license_activate';
const eventData = {
app_type: 'editor',
location: 'Elementor WP-admin pages',
secondaryLocation: 'license page',
trigger: 'click',
};
dispatchEvent?.( eventName, eventData );
} );
}
} );
}
}