-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3d124d1
commit d39e32f
Showing
3 changed files
with
28 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
34 changes: 19 additions & 15 deletions
34
plugins/woocommerce-admin/client/wp-admin-scripts/woo-subscriptions-notice/index.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
( function ( $ ) { | ||
$( document ).on( 'click', '.woo-subscription-expiring-notice,.woo-subscription-expired-notice', function ( e ) { | ||
const notice_id = this.id; | ||
if ( !notice_id ) { | ||
return; | ||
} | ||
$( document ).on( | ||
'click', | ||
'.woo-subscription-expiring-notice,.woo-subscription-expired-notice', | ||
function () { | ||
const notice_id = this.id; | ||
if ( ! notice_id ) { | ||
return; | ||
} | ||
|
||
var data = { | ||
notice_id: notice_id, | ||
}; | ||
const data = { | ||
notice_id, | ||
}; | ||
|
||
window.wp.apiFetch( { | ||
path: `/wc-admin/woo_subscription_notice_dissmiss/`, | ||
method: 'POST', | ||
data, | ||
} ) | ||
} ) | ||
} )( jQuery ); | ||
window.wp.apiFetch( { | ||
path: `/wc-admin/woo_subscription_notice_dissmiss/`, | ||
method: 'POST', | ||
data, | ||
} ); | ||
} | ||
); | ||
} )( window.jQuery ); |