llms_template_view_order( LLMS_Order $order )
Loads the template for a single order view on the student dashboard.
Parameters Parameters
- $order
-
(LLMS_Order) (Required) The order to display.
Return Return
(void)
Source Source
File: includes/functions/llms-functions-template-view-order.php
function llms_template_view_order( $order ) { // Validate order object and only allow the order's user to view the order. if ( ! $order instanceof LLMS_Order || get_current_user_id() !== $order->get( 'user_id' ) ) { _e( 'Invalid Order.', 'lifterlms' ); return; } /** * Allows customization of the view order layout on the student dashboard. * * @since 6.0.0 * * @param boolean $use_stacked_layout If `true`, forces usage of the stacked layout instead of the default side-by-side layout. * @param LLMS_Order $order The order to display. */ $layout_class = apply_filters( 'llms_sd_stacked_order_layout', false, $order ) ? 'llms-stack-cols' : ''; $transactions = _llms_template_view_order_get_transactions( $order ); llms_get_template( 'myaccount/view-order.php', compact( 'order', 'transactions', 'layout_class' ) ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
6.0.0 | Introduced. |