Skip to content

Commit f0cf932

Browse files
committed
Use new Postmark Status API in Status tab
1 parent 14a5a28 commit f0cf932

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

page-settings.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
$pm_status = json_decode(
187187
wp_remote_retrieve_body(
188188
wp_remote_get(
189-
'https://status.postmarkapp.com/api/1.0/status/',
189+
'https://status.postmarkapp.com/api/v1/status',
190190
array(
191191
'headers' => array(
192192
'Accept' => 'application/json',
@@ -203,14 +203,14 @@
203203
<th><label>Status</label></th>
204204

205205
<td>
206-
<?php echo $pm_status->status; ?>
206+
<?php echo $pm_status->page->state; ?>
207207
</td>
208208
</tr>
209209
<tr>
210210
<th><label>Last Checked</label></th>
211211
<td>
212212
<?php
213-
$unix_date = gmdate( 'U', strtotime( $pm_status->lastCheckDate ) );
213+
$unix_date = gmdate( 'U', strtotime( $pm_status->page->updated_at ) );
214214
$date_format = get_option( 'date_format' );
215215
$time_format = get_option( 'time_format' );
216216
echo wp_date( "{$date_format} {$time_format}", $unix_date );

0 commit comments

Comments
 (0)