Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Commit

Permalink
Bump to version 1.6.2
Browse files Browse the repository at this point in the history
1. Update Platform CRM API to v2
  • Loading branch information
aaronhuisinga committed Mar 14, 2019
1 parent 8cd277a commit a485dfc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
13 changes: 6 additions & 7 deletions classes/class-platform-crm.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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,
Expand All @@ -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']
]
Expand Down Expand Up @@ -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'],
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions program-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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');
Expand Down
4 changes: 2 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down

0 comments on commit a485dfc

Please sign in to comment.