Automattic\WooCommerce\Internal\Admin\Orders
ListTable::do_bulk_action_remove_personal_data()
Implements the "remove personal data" bulk action.
Method of the class: ListTable{}
Hooks from the method
Return
Int
. Number of orders modified.
Usage
// private - for code of main (parent) class only $result = $this->do_bulk_action_remove_personal_data( $order_ids ): int;
- $order_ids(array) (required)
- The Order IDs.
ListTable::do_bulk_action_remove_personal_data() ListTable::do bulk action remove personal data code WC 9.7.1
private function do_bulk_action_remove_personal_data( $order_ids ): int { $changed = 0; foreach ( $order_ids as $id ) { $order = wc_get_order( $id ); if ( ! $order ) { continue; } do_action( 'woocommerce_remove_order_personal_data', $order ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment ++$changed; } return $changed; }