diff --git a/classes/class-platform-crm.php b/classes/class-platform-crm.php index 49eaede..c7dd057 100644 --- a/classes/class-platform-crm.php +++ b/classes/class-platform-crm.php @@ -26,7 +26,7 @@ class PlatformCRM * * @param int $api_version */ - public function __construct($api_version = 1) + public function __construct($api_version = 2) { $this->token = 'pf_program_page'; $this->api_key = get_option('pf_program_page_frontdesk_key'); @@ -83,7 +83,7 @@ public function createCampaign($title, $permalink) public function updateCampaign($id, $title, $permalink) { if ($this->api_key != null || $this->api_key != '') { - $this->guzzle->post($this->api_base . 'campaigns/' . $id, [ + $this->guzzle->patch($this->api_base . 'campaigns/' . $id, [ 'form_params' => [ 'key' => $this->api_key, 'title' => $title, @@ -105,10 +105,10 @@ public function createProspect($data) { try { if ($this->api_key != null || $this->api_key != '') { - $response = $this->guzzle->post($this->api_base . 'subscribers/', [ + $response = $this->guzzle->post($this->api_base . 'subscribers/complete', [ 'form_params' => [ 'key' => $this->api_key, - 'campaign_id' => $data['campaign_id'], + 'campaigns' => $data['campaign_id'], 'email' => $data['email'], 'first_name' => $data['first_name'] ] @@ -136,10 +136,9 @@ public function updateProspect($id, $data) { try { if ($this->api_key != null || $this->api_key != '') { - $response = $this->guzzle->post($this->api_base . 'subscribers/update/', [ + $response = $this->guzzle->patch($this->api_base . 'subscribers/' . $id, [ 'form_params' => [ 'key' => $this->api_key, - 'id' => $id, 'email' => $data['email'], 'last_name' => $data['last_name'], 'address' => $data['address'], @@ -173,7 +172,7 @@ public function createNote($id, $title, $content) { try { if ($this->api_key != null || $this->api_key != '') { - $response = $this->guzzle->post($this->api_base . 'subscribers/note/', [ + $response = $this->guzzle->post($this->api_base . 'subscribers/notes/', [ 'form_params' => [ 'key' => $this->api_key, 'subscriber_id' => $id, diff --git a/program-page.php b/program-page.php index 9d0c253..f69e4ea 100755 --- a/program-page.php +++ b/program-page.php @@ -4,13 +4,13 @@ /* * Plugin Name: Program Page - * Version: 1.6.1 + * Version: 1.6.2 * Plugin URI: http://www.coldturkeygroup.com/ * Description: Custom info pages for Platform ad campaigns * Author: Cold Turkey Group * Author URI: http://www.coldturkeygroup.com/ * Requires at least: 4.0 - * Tested up to: 4.6 + * Tested up to: 5.1 * * @package Program Page * @author Aaron Huisinga @@ -26,7 +26,7 @@ } if (!defined('PROGRAM_PAGE_PLUGIN_VERSION')) { - define('PROGRAM_PAGE_PLUGIN_VERSION', '1.6.1'); + define('PROGRAM_PAGE_PLUGIN_VERSION', '1.6.2'); } require_once('classes/class-program-page.php'); diff --git a/readme.txt b/readme.txt index 1a8db98..eac1566 100755 --- a/readme.txt +++ b/readme.txt @@ -2,8 +2,8 @@ Contributors: Aaron Huisinga Tags: real estate, platform, days on market Requires at least: 3.5 -Tested up to: 4.6 -Stable tag: 1.6.1 +Tested up to: 5.1 +Stable tag: 1.6.2 Custom info pages for Platform ad campaigns (currently supports the HIP, Patriot, PATH, HEROES, BOOST, and First Responder Programs).