Automattic\WooCommerce\Internal\Admin\Orders
ListTable::get_bulk_actions
Retrieves the list of bulk actions available for this table.
Method of the class: ListTable{}
No Hooks.
Returns
Array.
Usage
// protected - for code of main (parent) or child class $result = $this->get_bulk_actions();
ListTable::get_bulk_actions() ListTable::get bulk actions code WC 10.3.5
protected function get_bulk_actions() {
$selected_status = $this->order_query_args['status'] ?? false;
if ( ! current_user_can( $this->wp_post_type->cap->edit_others_posts ) ) {
return array();
}
if ( array( 'trash' ) === $selected_status ) {
$actions = array(
'untrash' => __( 'Restore', 'woocommerce' ),
'delete' => __( 'Delete permanently', 'woocommerce' ),
);
} else {
$actions = array(
'mark_processing' => __( 'Change status to processing', 'woocommerce' ),
'mark_on-hold' => __( 'Change status to on-hold', 'woocommerce' ),
'mark_completed' => __( 'Change status to completed', 'woocommerce' ),
'mark_cancelled' => __( 'Change status to cancelled', 'woocommerce' ),
'trash' => __( 'Move to Trash', 'woocommerce' ),
);
}
if ( wc_string_to_bool( get_option( 'woocommerce_allow_bulk_remove_personal_data', 'no' ) ) ) {
$actions['remove_personal_data'] = __( 'Remove personal data', 'woocommerce' );
}
return $actions;
}