WC_Privacy::anonymize_orders_query( array $query )
For a given query, anonymize all matches.
Description Description
Parameters Parameters
- $query
-
(Required) Query array to pass to wc_get_orders().
Return Return
(int) Count of orders that were anonymized.
Source Source
File: includes/class-wc-privacy.php
protected static function anonymize_orders_query( $query ) { $orders = wc_get_orders( $query ); $count = 0; if ( $orders ) { foreach ( $orders as $order ) { WC_Privacy_Erasers::remove_order_personal_data( $order ); $count ++; } } return $count; }
Changelog Changelog
Version | Description |
---|---|
3.4.0 | Introduced. |