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.
LLMS_Privacy_Erasers::erase_order_data( LLMS_Order $order )
Erase and anonymize an order
Parameters Parameters
- $order
-
(LLMS_Order) (Required) Order object.
Return Return
(void)
Source Source
File: includes/privacy/class-llms-privacy-erasers.php
private static function erase_order_data( $order ) { // Cancel recurring orders. if ( $order->is_recurring() && in_array( $order->get( 'status' ), array( 'llms-on-hold', 'llms-active', 'llms-pending-cancel' ) ) ) { $order->set_status( 'cancelled' ); $order->add_note( __( 'Order cancelled during personal data erasure.', 'lifterlms' ) ); } $props = array_keys( self::get_order_data_props( 'erasure' ) ); foreach ( $props as $prop ) { $val = self::get_anon_prop_value( $prop ); $order->set( $prop, $val ); } $order->set( 'anonymized', 'yes' ); $order->add_note( __( 'Personal data removed during personal data erasure.', 'lifterlms' ) ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.30.3 | Fixed spelling error. |
3.18.0 | Introduced. |