Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
WC_Admin_API_Keys::bulk_actions()
Bulk actions.
Description Description
Source Source
File: includes/admin/class-wc-admin-api-keys.php
private function bulk_actions() { check_admin_referer( 'woocommerce-settings' ); if ( ! current_user_can( 'manage_woocommerce' ) ) { wp_die( esc_html__( 'You do not have permission to edit API Keys', 'woocommerce' ) ); } if ( isset( $_REQUEST['action'] ) ) { // WPCS: input var okay, CSRF ok. $action = sanitize_text_field( wp_unslash( $_REQUEST['action'] ) ); // WPCS: input var okay, CSRF ok. $keys = isset( $_REQUEST['key'] ) ? array_map( 'absint', (array) $_REQUEST['key'] ) : array(); // WPCS: input var okay, CSRF ok. if ( 'revoke' === $action ) { $this->bulk_revoke_key( $keys ); } } }