Automattic\WooCommerce\Internal\Logging

OrderLogsDeletionProcessor::get_next_batch_to_process_hpos │ private │ WC 1.0

Get the next batch of items to process, HPOS version.

Метод класса: OrderLogsDeletionProcessor{}

Хуков нет.

Возвращает

array.

Использование

// private - только в коде основоного (родительского) класса
$result = $this->get_next_batch_to_process_hpos( $size ): array;
$size(int) (обязательный)
Maximum size of the batch to return.

Код OrderLogsDeletionProcessor::get_next_batch_to_process_hpos() WC 11.2.2

private function get_next_batch_to_process_hpos( int $size ): array {
	global $wpdb;

	return $wpdb->get_results(
		$wpdb->prepare(
			"SELECT order_id, meta_value
                 FROM {$wpdb->prefix}wc_orders_meta
                 WHERE meta_key = %s
                 ORDER BY order_id
                 LIMIT %d",
			'_debug_log_source_pending_deletion',
			$size
		),
		ARRAY_A
	);
}