This commit is contained in:
2025-11-18 16:39:33 +00:00
parent c70394d367
commit df1f90c6cd
9673 changed files with 3464697 additions and 34 deletions
@@ -0,0 +1,31 @@
<?php
namespace ElementsKit_Lite\Libs\Framework\Classes;
use ElementsKit_Lite\Traits\Singleton;
defined( 'ABSPATH' ) || exit;
class Plugin_Data_Sender {
use Singleton;
public function __construct() {}
private function getUrl( $route ) {
return trailingslashit(\ElementsKit_Lite::api_url() . $route);
}
public function sendEmailSubscribeData( $route, $data ) {
return wp_remote_post(
$this->getUrl( $route ),
array(
'method' => 'POST',
'headers' => array(
'Accept' => '*/*',
'Content-Type' => 'application/json'
),
'body' => wp_json_encode( $data ),
)
);
}
}