LLMS_Privacy_Exporters::order_data( string $email_address, int $page )
Export student orders data by email address
Parameters Parameters
- $email_address
-
(string) (Required) Email address of the user to retrieve data for.
- $page
-
(int) (Required) Process page number.
Return Return
(array)
Source Source
File: includes/privacy/class-llms-privacy-exporters.php
public static function order_data( $email_address, $page ) { $data = array(); $student = self::get_student_by_email( $email_address ); if ( ! $student ) { return self::get_return( $data ); } $orders = self::get_student_orders( $student, $page ); $group_label = __( 'Orders', 'lifterlms' ); $group_description = __( 'Student orders data.', 'lifterlms' ); foreach ( $orders['orders'] as $order ) { $data[] = array( 'group_id' => 'lifterlms_orders', 'group_label' => $group_label, 'group_description' => $group_description, 'item_id' => sprintf( 'order-%d', $order->get( 'id' ) ), 'data' => self::get_order_data( $order ), ); } return self::get_return( $data, $orders['done'] ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.37.9 | Added $group_description to the group exporter. |
3.18.0 | Introduced. |