forked from LiveCarta/LiveCartaWP
LAW-5279
This commit is contained in:
15
htdocs/wp-content/plugins/wp-rest-api-event/HttpClient.php
Normal file → Executable file
15
htdocs/wp-content/plugins/wp-rest-api-event/HttpClient.php
Normal file → Executable file
@@ -7,6 +7,21 @@ namespace app\wpRestApiEvent;
|
||||
*/
|
||||
class HttpClient
|
||||
{
|
||||
/**
|
||||
* @param string $eventType
|
||||
* @param $data
|
||||
*
|
||||
* @return null|string
|
||||
*/
|
||||
public function logEvent(string $eventType, $data)
|
||||
{
|
||||
$data['event'] = [
|
||||
'slug' => $eventType,
|
||||
];
|
||||
|
||||
return $this->doPostRequest(LAWCARTA_WP_REST_API_EVENT_LOG_URL, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $data
|
||||
* @return null|string
|
||||
|
||||
Reference in New Issue
Block a user