Skip to content

Commit

Permalink
Merge pull request #27 from newfold-labs/rename/data-attributes
Browse files Browse the repository at this point in the history
Update PLS data attributes
  • Loading branch information
wpscholar authored Oct 16, 2024
2 parents 7eb5301 + c1bc771 commit d8a9950
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/Scripts/dataAttrListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ domReady( () => {
const el = e.target;

if ( el.hasAttribute( 'data-nfd-installer-plugin-name' ) ) {

// Don't follow the existing link
e.preventDefault();

Expand All @@ -38,19 +37,19 @@ domReady( () => {

// Is premium plugin
if (
el.hasAttribute( 'data-nfd-installer-plugin-slug' ) &&
el.hasAttribute( 'data-nfd-installer-plugin-provider' )
el.hasAttribute( 'data-nfd-installer-pls-slug' ) &&
el.hasAttribute( 'data-nfd-installer-pls-provider' )
) {
dispatchEvent( {
action: 'installPremiumPlugin',
pluginName: el.getAttribute(
'data-nfd-installer-plugin-name'
),
pluginSlug: el.getAttribute(
'data-nfd-installer-plugin-slug'
'data-nfd-installer-pls-slug'
),
pluginProvider: el.getAttribute(
'data-nfd-installer-plugin-provider'
'data-nfd-installer-pls-provider'
),
redirectUrl,
} );
Expand Down

0 comments on commit d8a9950

Please sign in to comment.