LLMS_Student_Dashboard::output_orders_content()
Endpoint to output orders content
Description Description
Return Return
(void)
Source Source
File: includes/class.llms.student.dashboard.php
public static function output_orders_content() { global $wp; $args = array(); if ( ! empty( $wp->query_vars['orders'] ) ) { $order = new LLMS_Order( $wp->query_vars['orders'] ); // ensure people can't locate other peoples orders by dropping numbers into the url bar if ( get_current_user_id() !== $order->get( 'user_id' ) ) { $order = false; $transactions = array(); } else { $transactions = $order->get_transactions( array( 'per_page' => apply_filters( 'llms_student_dashboard_transactions_per_page', 20 ), 'paged' => isset( $_GET['txnpage'] ) ? absint( $_GET['txnpage'] ) : 1, ) ); } llms_get_template( 'myaccount/view-order.php', array( 'order' => $order, 'transactions' => $transactions, ) ); } else { $student = new LLMS_Student(); llms_get_template( 'myaccount/my-orders.php', array( 'orders' => $student->get_orders( array( 'page' => isset( $_GET['opage'] ) ? intval( $_GET['opage'] ) : 1, ) ), ) ); } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: