woocommerce/includes/admin/settings/views/html-webhook-log.php

38 lines
1.5 KiB
PHP
Raw Normal View History

2014-12-17 17:50:19 +00:00
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
2014-12-17 17:50:19 +00:00
}
?>
<tr>
<td><?php echo date_i18n( __( 'M j, Y @ G:i', 'woocommerce' ), strtotime( $log['comment']->comment_date_gmt ), true ); ?></td>
<td><?php echo esc_attr( $log['request_url'] ); ?></td>
2014-12-17 17:50:19 +00:00
<td>
<p><strong><?php _e( 'Method', 'woocommerce' ); ?>: </strong><?php echo esc_html( $log['request_method'] ); ?></p>
<p><strong><?php _e( 'Duration', 'woocommerce' ); ?>: </strong><?php echo esc_html( $log['duration'] ); ?></p>
2014-12-17 17:50:19 +00:00
<p><strong><?php _e( 'Headers', 'woocommerce' ); ?>:</strong></p>
<ul>
2016-09-13 21:24:21 +00:00
<?php foreach ( (array) $log['request_headers'] as $key => $value ) : ?>
2014-12-17 17:50:19 +00:00
<li><strong><em><?php echo strtolower( esc_html( $key ) ); ?>: </em></strong><code><?php echo esc_html( $value ); ?></code></li>
<?php endforeach ?>
</ul>
<p><strong><?php _e( 'Content', 'woocommerce' ); ?>: </strong></p>
<pre><code><?php echo esc_html( $log['request_body'] ); ?></code></pre>
</td>
<td>
<p><strong><?php _e( 'Status', 'woocommerce' ); ?>: </strong><?php echo esc_html( $log['summary'] ); ?></p>
<p><strong><?php _e( 'Headers', 'woocommerce' ); ?>:</strong></p>
<ul>
2015-01-21 16:25:33 +00:00
<?php foreach ( (array) $log['response_headers'] as $key => $value ) : ?>
2014-12-17 17:50:19 +00:00
<li><strong><em><?php echo strtolower( esc_html( $key ) ); ?>: </em></strong><code><?php echo esc_html( $value ); ?></code></li>
<?php endforeach ?>
</ul>
<?php if ( ! empty( $log['response_body'] ) ) : ?>
<h4><?php _e( 'Content', 'woocommerce' ); ?>:</h4>
<p><?php echo esc_html( $log['response_body'] ); ?></p>
<?php endif; ?>
</td>
</tr>