LLMS_Meta_Box_Order_Transactions::output()

Function to field WP::output() method call Passes output instruction to parent


Description Description


Parameters Parameters

$post

(object) (Required) WP global post object


Top ↑

Return Return

(void)


Top ↑

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'] ) ? $_GET['txns-page'] : 1;
		// allow users to see all if they really want to
		$per_page = isset( $_GET['txns-count'] ) ? $_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,
		) );

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.





Permalink: