Skip to content

Commit

Permalink
fix: wrong page parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
lelinhtinh committed Dec 2, 2022
1 parent c0c4ecb commit daa0239
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions admin/js/coupon-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ jQuery(function ($) {

$code.trigger('focus');
$form[0].reset();
const page = new URLSearchParams(location.search).get('page');
const pageParam = encodeURIComponent(page);

const row = `
<tr>
Expand All @@ -71,15 +73,15 @@ jQuery(function ($) {
<div class="row-actions">
<span class="hide">
<a
href="admin.php?page=wp-coupon%2Fadmin%2Fpartials%2Fcoupon-admin-display.php&amp;action=hide&amp;coupon=${ID}&amp;_wpnonce=${
href="admin.php?page=${pageParam}&amp;action=hide&amp;coupon=${ID}&amp;_wpnonce=${
oms_coupon_admin_ajax.nonce
}"
>Hide</a>
</span>
|
<span class="delete">
<a
href="admin.php?page=wp-coupon%2Fadmin%2Fpartials%2Fcoupon-admin-display.php&amp;action=delete&amp;coupon=${ID}&amp;_wpnonce=${
href="admin.php?page=${pageParam}&amp;action=delete&amp;coupon=${ID}&amp;_wpnonce=${
oms_coupon_admin_ajax.nonce
}"
>Delete</a>
Expand Down

0 comments on commit daa0239

Please sign in to comment.