WordPress at Your Fingertips
function is not described

WC_Admin_Log_Table_List::get_items_query_offset() protected WC 1.0

Get prepared OFFSET clause for items query

{} It's a method of the class: WC_Admin_Log_Table_List{}

No Hooks.

Return

String. Prepared OFFSET clause for items query.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_items_query_offset();

Notes

  • Global. wpdb. $wpdb

Code of WC_Admin_Log_Table_List::get_items_query_offset() WC 5.8.0

protected function get_items_query_offset() {
	global $wpdb;

	$per_page     = $this->get_items_per_page( 'woocommerce_status_log_items_per_page', 10 );
	$current_page = $this->get_pagenum();
	if ( 1 < $current_page ) {
		$offset = $per_page * ( $current_page - 1 );
	} else {
		$offset = 0;
	}

	return $wpdb->prepare( 'OFFSET %d', $offset );
}