feat(Core): add optimize and complete code
This commit is contained in:
@@ -144,6 +144,10 @@ class Sodino_Upsell_List_Table extends WP_List_Table {
|
||||
|
||||
public function process_bulk_action() {
|
||||
if ('delete' === $this->current_action()) {
|
||||
if (!current_user_can('manage_options')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$upsell_ids = isset($_POST['upsell_ids']) ? array_map('intval', $_POST['upsell_ids']) : [];
|
||||
if (!empty($upsell_ids) && check_admin_referer('bulk-' . $this->_args['plural'])) {
|
||||
foreach ($upsell_ids as $id) {
|
||||
|
||||
Reference in New Issue
Block a user