html-webhook-logs.php 1006 Bytes
Newer Older
imac's avatar
imac committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
<?php

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

$count_comments = wp_count_comments( $webhook->id );
$total          = $count_comments->approved;

?>

<?php echo WC_Admin_Webhooks::get_logs_navigation( $total, $webhook ); ?>

<table id="webhook-logs-table" class="widefat">
	<thead>
		<tr>
			<th><?php _e( 'Date', 'woocommerce' ); ?></th>
			<th><?php _e( 'URL', 'woocommerce' ); ?></th>
			<th><?php _e( 'Request', 'woocommerce' ); ?></th>
			<th><?php _e( 'Response', 'woocommerce' ); ?></th>
		</tr>
	</thead>
	<tfoot>
		<tr>
			<th><?php _e( 'Date', 'woocommerce' ); ?></th>
			<th><?php _e( 'URL', 'woocommerce' ); ?></th>
			<th><?php _e( 'Request', 'woocommerce' ); ?></th>
			<th><?php _e( 'Response', 'woocommerce' ); ?></th>
		</tr>
	</tfoot>
	<tbody>
		<?php
			foreach ( $logs as $log ) {
				$log = $webhook->get_delivery_log( $log->comment_ID );

				include( 'html-webhook-log.php' );
			}
		?>
	</tbody>
</table>

<?php echo WC_Admin_Webhooks::get_logs_navigation( $total, $webhook ); ?>