forked from LiveCarta/LiveCartaWP
LAW-5279
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -28,5 +28,6 @@ htdocs/wp-content/themes/*
|
|||||||
!htdocs/wp-content/themes/index.php
|
!htdocs/wp-content/themes/index.php
|
||||||
|
|
||||||
!htdocs/wp-content/plugins/wp-rest-api-event
|
!htdocs/wp-content/plugins/wp-rest-api-event
|
||||||
|
!htdocs/wp-content/plugins/subscribe-to-lc
|
||||||
|
|
||||||
vendor/
|
vendor/
|
||||||
|
|||||||
@@ -11,3 +11,4 @@ define('LAWCARTA_SUBDOMAIN', 'app');
|
|||||||
define('LAWCARTA_PORT', '');
|
define('LAWCARTA_PORT', '');
|
||||||
|
|
||||||
define('LAWCARTA_WP_REST_API_URL', 'http://app.livecarta.loc/v1');
|
define('LAWCARTA_WP_REST_API_URL', 'http://app.livecarta.loc/v1');
|
||||||
|
define('LAWCARTA_WP_REST_API_EVENT_LOG_URL', 'http://app.livecarta.loc/v1/event/add');
|
||||||
|
|||||||
@@ -59,10 +59,12 @@ class HttpClient
|
|||||||
]);
|
]);
|
||||||
$sysLogId = null;
|
$sysLogId = null;
|
||||||
/** @var \WP_HTTP_Requests_Response $httpResponse */
|
/** @var \WP_HTTP_Requests_Response $httpResponse */
|
||||||
$httpResponse = $response['http_response'];
|
if(!empty($response['http_response'])){
|
||||||
if ($httpResponse->get_status() == 200) {
|
$httpResponse = $response['http_response'];
|
||||||
$body = isset($response['body']) ? json_decode($response['body'], true) : null;
|
if ($httpResponse->get_status() == 200) {
|
||||||
$sysLogId = $body['sysLogId'] ?? null;
|
$body = isset($response['body']) ? json_decode($response['body'], true) : null;
|
||||||
|
$sysLogId = $body['sysLogId'] ?? null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $sysLogId;
|
return $sysLogId;
|
||||||
|
|||||||
Reference in New Issue
Block a user