LLMS_Meta_Box_Order_Transactions::output()
Function to field WP::output() method call Passes output instruction to parent
Return Return
(void)
Source Source
File: includes/admin/post-types/meta-boxes/class.llms.meta.box.order.transactions.php
public function output() { $order = new LLMS_Order( $this->post ); $curr_page = isset( $_GET['txns-page'] ) ? absint( wp_unslash( $_GET['txns-page'] ) ) : 1; // Allow users to see all if they really want to. $per_page = isset( $_GET['txns-count'] ) ? absint( wp_unslash( $_GET['txns-count'] ) ) : 20; $transactions = $order->get_transactions( array( 'per_page' => $per_page, 'paged' => $curr_page, ) ); $edit_link = get_edit_post_link( $this->post->ID ); $prev_url = ( $transactions['page'] > 1 ) ? add_query_arg( 'txns-page', $curr_page - 1, $edit_link ) . '#' . $this->id : false; $next_url = ( $transactions['page'] < $transactions['pages'] ) ? add_query_arg( 'txns-page', $curr_page + 1, $edit_link ) . '#' . $this->id : false; $all_url = ( $next_url || $prev_url ) ? add_query_arg( 'txns-count', -1, $edit_link ) . '#' . $this->id : false; llms_get_template( 'admin/post-types/order-transactions.php', array( 'all_url' => $all_url, 'next_url' => $next_url, 'prev_url' => $prev_url, 'transactions' => $transactions, ) ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.35.0 | Sanitize $_GET data. |
3.0.0 | Introduced. |