Added Script to restrict deletion if still user denies

This commit is contained in:
mehul0810 2017-10-08 15:29:23 +05:30
parent 6e6af2285c
commit 5c0feaf93c
1 changed files with 9 additions and 0 deletions

View File

@ -118,4 +118,13 @@ jQuery(function( $ ) {
}
});
$( '#wpbody' ).on( 'click', '.delete-permanently', function() {
var confirm_delete = confirm( woocommerce_admin.delete_product_message );
// Stop redirection, if user denies to delete the product.
if( ! confirm_delete ) {
return false;
}
});
});