Added Script to restrict deletion if still user denies
This commit is contained in:
parent
6e6af2285c
commit
5c0feaf93c
|
@ -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;
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue