golden hour
/home/godaofbq/besthyperbaric.com/wp-content/plugins/oxygen/plugin/licensing/events
⬆️ Go Up
Upload
File/Folder
Size
Actions
.htaccess
420 B
Del
OK
base.php
120 B
Del
OK
events.php
627 B
Del
OK
log.php
1.05 KB
Del
OK
Edit: log.php
<?php namespace Breakdance\Licensing\Events; use function Breakdance\Tracking\is_tracking_enabled; use function Breakdance\Admin\is_breakdance_development_environment; /** * @param string $userId * @param string $eventType * @param array $eventProperties */ function log($userId, $eventType, $eventProperties = []) { if (BREAKDANCE_MODE === 'oxygen' || !is_tracking_enabled() || is_breakdance_development_environment()) { return; } /** * @var array */ $eventProperties = apply_filters('breakdance_licensing_and_usage_event_properties', $eventProperties); $api_url = 'https://breakdance.com/wp-json/licensing-and-usage/v1/event'; $body = json_encode([ 'user_id' => $userId, 'event_type' => $eventType, 'event_properties' => $eventProperties ]); $args = [ 'method' => 'POST', 'headers' => array( 'Content-Type' => 'application/json', ), 'body' => $body, 'data_format' => 'body', ]; wp_remote_request($api_url, $args); }
Save