Plugin Directory

Changeset 1750125


Ignore:
Timestamp:
10/20/2017 08:04:33 PM (8 years ago)
Author:
pushpress
Message:

Fixed settings for lead page.

Location:
pushpress-integration/trunk
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • pushpress-integration/trunk/inc/wp_pushpress_model.php

    r1617931 r1750125  
    596596            // get integration settings
    597597            $integration_settings = Pushpress_Client::settings('lead_capture');
     598           
     599            $integration_settings = $integration_settings->data;
    598600            /*
    599601            if (!$integration_settings = get_transient("pp_settings_lead_capture")) {
     
    846848        try {
    847849            $integration_settings = Pushpress_Client::settings('integration');
     850            $integration_settings = $integration_settings->data;
    848851        }
    849852        catch (Exception $e) {
     
    854857            try {
    855858                $integration_settings = Pushpress_Client::settings('integration');
     859                $integration_settings = $integration_settings->data;
    856860            }
    857861            catch (Exception $e) {
     
    887891        try {
    888892            $settingsObj = Pushpress_Client::settings('metrics');               
     893            $settingsObj = $settingsObj->data;
    889894        }
    890895        catch (Exception $e) {
     
    896901            try {
    897902                $settingsObj = Pushpress_Client::settings('metrics');               
     903                $settingsObj = $settingsObj->data;
    898904            }
    899905            catch (Exception $e) {
  • pushpress-integration/trunk/inc/wp_pushpress_shortcode.php

    r1608875 r1750125  
    185185
    186186        if( !$client = get_transient( 'pp_client2' ) ){
    187             echo "<br><br>Getting Client from API";
    188187            try {
    189188                $client = Pushpress_Client::retrieve('self');
  • pushpress-integration/trunk/lib/php-sdk/lib/Pushpress.php

    r1276989 r1750125  
    3838
    3939// Pushpress API Resources
     40require(dirname(__FILE__) . '/Pushpress/Activity.php');
     41require(dirname(__FILE__) . '/Pushpress/App.php');
    4042require(dirname(__FILE__) . '/Pushpress/Billing.php');
    4143require(dirname(__FILE__) . '/Pushpress/Calendar.php');
     44require(dirname(__FILE__) . '/Pushpress/CalendarItemRating.php');
     45require(dirname(__FILE__) . '/Pushpress/CalendarType.php');
    4246require(dirname(__FILE__) . '/Pushpress/Checkin.php');
    4347require(dirname(__FILE__) . '/Pushpress/Client.php');
    4448require(dirname(__FILE__) . '/Pushpress/Contract.php');
    4549require(dirname(__FILE__) . '/Pushpress/Customer.php');
     50require(dirname(__FILE__) . '/Pushpress/Document.php');
    4651require(dirname(__FILE__) . '/Pushpress/Discount.php');
    4752require(dirname(__FILE__) . '/Pushpress/Invoice.php');
     53require(dirname(__FILE__) . '/Pushpress/InvoiceItem.php');
    4854require(dirname(__FILE__) . '/Pushpress/Message.php');
     55require(dirname(__FILE__) . '/Pushpress/MessageLog.php');
     56require(dirname(__FILE__) . '/Pushpress/MetricsCoach.php');
    4957require(dirname(__FILE__) . '/Pushpress/Order.php');
     58require(dirname(__FILE__) . '/Pushpress/Partner.php');
     59require(dirname(__FILE__) . '/Pushpress/Payrate.php');
     60require(dirname(__FILE__) . '/Pushpress/PayrollItem.php');
     61require(dirname(__FILE__) . '/Pushpress/PayrollReport.php');
    5062require(dirname(__FILE__) . '/Pushpress/Plan.php');
     63require(dirname(__FILE__) . '/Pushpress/PlanCalendarItemType.php');
     64require(dirname(__FILE__) . '/Pushpress/PlanCategory.php');
    5165require(dirname(__FILE__) . '/Pushpress/Preorder.php');
    5266require(dirname(__FILE__) . '/Pushpress/Product.php');
    5367require(dirname(__FILE__) . '/Pushpress/ProductCategories.php');
    5468require(dirname(__FILE__) . '/Pushpress/Registration.php');
     69require(dirname(__FILE__) . '/Pushpress/Report.php');
    5570require(dirname(__FILE__) . '/Pushpress/User.php');
     71require(dirname(__FILE__) . '/Pushpress/SchedulerCredit.php');
     72require(dirname(__FILE__) . '/Pushpress/SchedulerType.php');
     73require(dirname(__FILE__) . '/Pushpress/SchedulerRate.php');
    5674require(dirname(__FILE__) . '/Pushpress/Subscriptions.php');
     75require(dirname(__FILE__) . '/Pushpress/SubscriptionPayroll.php');
    5776require(dirname(__FILE__) . '/Pushpress/SubscriptionContract.php');
    5877require(dirname(__FILE__) . '/Pushpress/TaxRates.php');
    5978require(dirname(__FILE__) . '/Pushpress/Token.php');
    6079require(dirname(__FILE__) . '/Pushpress/Track.php');
     80require(dirname(__FILE__) . '/Pushpress/TrackBenchmark.php');
     81require(dirname(__FILE__) . '/Pushpress/TrackBenchmarkResult.php');
    6182require(dirname(__FILE__) . '/Pushpress/TrackWorkout.php');
    6283require(dirname(__FILE__) . '/Pushpress/TrackFavoriteWorkout.php');
    6384require(dirname(__FILE__) . '/Pushpress/TrackScoringType.php');
    6485require(dirname(__FILE__) . '/Pushpress/TrackWorkoutType.php');
     86require(dirname(__FILE__) . '/Pushpress/UserImage.php');
     87require(dirname(__FILE__) . '/Pushpress/UserTip.php');
    6588require(dirname(__FILE__) . '/Pushpress/Waiver.php');
    6689require(dirname(__FILE__) . '/Pushpress/Workout.php');
     90require(dirname(__FILE__) . '/Pushpress/UserDocument.php');
    6791require(dirname(__FILE__) . '/Pushpress/UserWaiver.php');
  • pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/ApiRequestor.php

    r1500641 r1750125  
    8181       
    8282    if (!is_array($resp) || !isset($resp['error']))
    83       throw new Pushpress_ApiError("Invalid response object from API: $rbody (HTTP response code was $rcode)", $rcode, $rbody, $resp);
     83      throw new Pushpress_ApiError("There was an error: $rbody", $rcode, $rbody, $resp);
    8484    $error = $resp['error'];
    8585    switch ($rcode) {
     
    106106    if (!$myApiKey)
    107107      $myApiKey = PushpressApi::$apiKey;
    108     if (!$myApiKey)
    109       throw new Pushpress_AuthenticationError('No API key provided.  (HINT: set your API key using "PushpressApi::setApiKey(<API-KEY>)".  You can generate API keys from the Pushpress web interface.  See https://pushpress.com/api for details, or email support@pushpress.com if you have any questions.');
     108   
     109
     110
     111    // if (!$myApiKey)
     112    // allow no api key requests
     113    //  throw new Pushpress_AuthenticationError('No API key provided.  (HINT: set your API key using "PushpressApi::setApiKey(<API-KEY>)".  You can generate API keys from the Pushpress web interface.  See https://pushpress.com/api for details, or email support@pushpress.com if you have any questions.');
    110114
    111115   
     
    120124        'publisher' => 'pushpress',
    121125        'uname' => $uname);
    122     $headers = array('X-Pushpress-Client-User-Agent: ' . json_encode($ua),
    123              'User-Agent: Pushpress/v1 PhpBindings/' . PushpressApi::VERSION,
    124                      'Authorization: Basic ' . base64_encode($myApiKey));
     126
     127    $user_agent =  "Pushpress/v1:" . (array_key_exists('PP-APP-ID', $_SERVER) ? $_SERVER['PP-APP-ID'] : 'Generic PhpBindings' );
     128
     129    $headers = array('X-Pushpress-Client-User-Agent: ' . json_encode($ua),       
     130            'User-Agent: ' . $user_agent);
     131
     132    if (strlen($myApiKey)) {
     133      $headers[] = 'Authorization: Basic ' . base64_encode($myApiKey);
     134    }
     135       
     136   
    125137    if (PushpressApi::$apiVersion)
    126138      $headers[] = 'Pushpress-Version: ' . PushpressApi::$apiVersion;
    127139
    128    
     140    $headers[] = 'X-FORWARDED-FOR: ' . $_SERVER['REMOTE_ADDR'];
     141
    129142    list($rbody, $rcode) = $this->_curlRequest($meth, $absUrl, $headers, $params);
    130143    return array($rbody, $rcode, $myApiKey);
     
    132145
    133146  private function _interpretResponse($rbody, $rcode)
    134   {     
     147  {     
     148   
     149    $rbody = str_replace("\&", "&", $rbody);
     150
    135151    try {
    136152      $resp = json_decode($rbody, true);
     
    138154      throw new Pushpress_ApiError("Invalid response body from API: $rbody (HTTP response code was $rcode)", $rcode, $rbody);
    139155    }
    140    
     156
    141157    if (!$resp) {
    142158        $resp = json_decode($rbody, true);
     
    158174      $opts[CURLOPT_HTTPGET] = 1;
    159175      if (count($params) > 0) {
    160     $encoded = self::encode($params);
    161     $absUrl = "$absUrl?$encoded";
     176           $encoded = self::encode($params);
     177           $absUrl = "$absUrl?$encoded";
    162178      }
    163179    } else if ($meth == 'post') {
     
    174190    }
    175191    else if ($meth == 'delete')  {
    176       $opts[CURLOPT_CUSTOMREQUEST] = 'DELETE';
     192      $opts[CURLOPT_CUSTOMREQUEST] = "DELETE";
     193      $opts[CURLOPT_POSTFIELDS] = self::encode($params);
     194     
    177195      if (count($params) > 0) {
    178     $encoded = self::encode($params);
    179     $absUrl = "$absUrl?$encoded";
    180       }
     196           $encoded = self::encode($params);
     197           $absUrl = "$absUrl?$encoded";
     198        }
    181199    } else {
    182200      throw new Pushpress_ApiError("Unrecognized method $meth");
     
    209227    }
    210228
     229   
    211230   
    212231   
  • pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/ApiResource.php

    r1571482 r1750125  
    99      throw new Pushpress_Error("You must pass an value Identifer into the retrieve function to get an object.");
    1010    }
     11
    1112    $instance = new $class($id, $apiKey);
    1213    $instance->refresh($params);
     
    5758    $requestor = new Pushpress_ApiRequestor($this->_apiKey);
    5859    $url = $this->emptyUrl();
     60    // echo $url;
     61    // die();
    5962    list($response, $apiKey) = $requestor->request('get', $url, $this->_retrieveOptions);
    6063    $this->refreshFrom($response, $apiKey);
     
    103106    public function instanceUrl()
    104107    {
    105         $id = $this['id'];   
     108        $id = $this['id'];
     109
     110        if (!$id) {
     111          $id = $this['uuid'];
     112        }   
    106113        $class = get_class($this);
    107114    $id = Pushpress_ApiRequestor::utf8($id);
     
    168175    $requestor = new Pushpress_ApiRequestor($apiKey);
    169176    $url = self::_scopedLsb($class, 'classUrl', $class);
    170     $url = preg_replace("/(ss)$/", "s", $url);   
     177    $url = preg_replace("/(ss)$/", "s", $url);
     178    // echo $url;
     179//      echo '<br>';
     180  //    var_dump($params);
     181    //die();
    171182    list($response, $apiKey) = $requestor->request('post', $url, $params);
    172183    return Pushpress_Util::convertToPushpressObject($response, $apiKey);
     
    181192    if (count($params) > 0) {
    182193      $url = $this->instanceUrl();
    183      
     194      // echo "<br>URL: " . $url;
     195      // echo "<br>params:<br>";
     196      // var_dump($params);
     197      // die();
     198
    184199      list($response, $apiKey) = $requestor->request('post', $url, $params);
    185200      $this->refreshFrom($response, $apiKey);
     
    193208    $requestor = new Pushpress_ApiRequestor($this->_apiKey);
    194209    $params = $this->serializeParameters();
    195    
     210
    196211    if (count($params) > 0) {
    197212      $url = $this->instanceUrl();
     213
     214      // echo 'URL ' . $url;
     215      // echo 'PRARAMS:<br>';var_dump($params);
     216      // die();
     217
    198218      list($response, $apiKey) = $requestor->request('put', $url, $params);
    199219      $this->refreshFrom($response, $apiKey);
     
    207227    $requestor = new Pushpress_ApiRequestor($this->_apiKey);
    208228    $url = $this->instanceUrl();
    209    
     229
     230    //echo $url;
     231    //var_dump($params);
     232    //die();
     233
    210234    list($response, $apiKey) = $requestor->request('delete', $url, $params);
    211235    $this->refreshFrom($response, $apiKey);
    212236    return $this;
    213237  }
     238
     239  protected static function _scopedReport($class, $report_name, $params=null, $apiKey=null)
     240  {
     241    $requestor = new Pushpress_ApiRequestor($apiKey);
     242    $url = self::_scopedLsb($class, 'classUrl', $class);
     243    $url = preg_replace("/(ss)$/", "s", $url);
     244    $url .= "/" . $report_name;
     245
     246    $p = null;
     247
     248    if ($params) {
     249      $params = json_encode($params);
     250      $p = array(
     251        "params" => $params
     252      );
     253    }
     254    list($response, $apiKey) = $requestor->request('post', $url, $p);
     255
     256    return Pushpress_Util::convertToPushpressObject($response, $apiKey);
     257  }
    214258}
  • pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Billing.php

    r1230496 r1750125  
    3838  }
    3939 
     40  public static function retrieveAch($params=null, $apiKey=null) {   
     41 
     42        $class = get_class();
     43        $url = self::classUrl($class);
     44        $url .=  "/" . $params['user_id'] . "/ach";
     45       
     46        $requestor = new Pushpress_ApiRequestor();
     47        list($response, $apiKey) = $requestor->request('get', $url, $params);
     48        return Pushpress_Util::convertToPushpressObject($response, $apiKey);               
     49  } 
     50
     51  public static function linkPlaidAch($params=null, $apiKey=null) {   
     52   
     53        $class = get_class();
     54        $url = self::classUrl($class);
     55        $url .= "/ach/plaid";
     56
     57        $requestor = new Pushpress_ApiRequestor();
     58        list($response, $apiKey) = $requestor->request('post', $url, $params);
     59        return Pushpress_Util::convertToPushpressObject($response, $apiKey);               
     60  } 
     61
     62
     63  public static function verifyAch($params=null, $apiKey=null) {   
     64 
     65        $class = get_class();
     66        $url = self::classUrl($class);
     67        $url .= "/ach";
     68        $requestor = new Pushpress_ApiRequestor();
     69        list($response, $apiKey) = $requestor->request('post', $url, $params);
     70        return Pushpress_Util::convertToPushpressObject($response, $apiKey);               
     71  } 
     72
     73 
     74
    4075  public static function all($params=null, $apiKey=null)
    4176  {
  • pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Client.php

    r1276989 r1750125  
    5151        $url .= "/settings/$type";
    5252        $requestor = new Pushpress_ApiRequestor();
    53             // $x = $requestor->request('get', $url);
    5453        list($response, $apiKey) = $requestor->request('get', $url);
    5554        return Pushpress_Util::convertToPushpressObject($response, $apiKey);
    56         //list($response, $apiKey) = $requestor->request('get', $url);
    57         //return self::scopedConstructFrom($class, $response, $apiKey);
    58      
    59   }
     55    }
    6056   
    6157    public static function referralSources() {
  • pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Contract.php

    r1276989 r1750125  
    11<?php
    22
    3 class Pushpress_Contracts extends Pushpress_ApiResource
     3class Pushpress_Contract extends Pushpress_ApiResource
    44{
    55   
  • pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Customer.php

    r1276989 r1750125  
    7575        return $this;
    7676  }
     77  public function customers($params=null, $apiKey=null) {
     78             
     79        $requestor = new Pushpress_ApiRequestor($this->_apiKey);
     80        $url = $this->instanceUrl() . '/customers';
     81       
     82        list($response, $apiKey) = $requestor->request('get', $url, $params);
     83        $this->refreshFrom($response, $apiKey);
     84        return $this;
     85  }
    7786   
    7887    public function leadfunnel($params=null, $apiKey=null) {
     
    9099        $requestor = new Pushpress_ApiRequestor($this->_apiKey);
    91100        $url = $this->instanceUrl() . '/leadfunnel';
    92         list($response, $apiKey) = $requestor->request('post', $url, $params);
     101            list($response, $apiKey) = $requestor->request('post', $url, $params);
    93102        $this->refreshFrom($response, $apiKey);
    94103       
    95         return $this;
     104            return $this;
    96105    }
    97106   
     
    115124        return $this;
    116125    }
     126
     127    public function roster($params=null, $apiKey=null) {
     128        $requestor = new Pushpress_ApiRequestor($this->_apiKey);
     129        $url = $this->instanceUrl() . '/roster';
     130       
     131        list($response, $apiKey) = $requestor->request('get', $url, $params);
     132        $this->refreshFrom($response, $apiKey);
     133        return $this;
     134    }
     135
     136    public function referrals($params=null, $apiKey=null) {
     137        $requestor = new Pushpress_ApiRequestor($this->_apiKey);
     138        $url = $this->instanceUrl() . '/referrals';
     139       
     140        list($response, $apiKey) = $requestor->request('get', $url, $params);
     141        $this->refreshFrom($response, $apiKey);
     142        return $this;
     143    }
     144
     145    public function validate($params=null) {
     146        $class = get_class();
     147        $url = self::classUrl($class);
     148        $url .=  "/validate";
     149
     150        $requestor = new Pushpress_ApiRequestor();
     151        list($response, $apiKey) = $requestor->request('post', $url, $params);
     152        return Pushpress_Util::convertToPushpressObject($response, $apiKey);   
     153
     154    }
     155   
    117156       
    118157}
  • pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Invoice.php

    r1276989 r1750125  
    7979  public function charge($params=array()) {       
    8080    $url =  $this->instanceUrl() . '/charge';
     81
    8182    $requestor = new Pushpress_ApiRequestor($this->_apiKey);
    82     // echo $url;
    83     // echo '<br>';
    84     // var_dump($params);
    85     // die();
     83     // echo $url;
     84     // echo '<br>';
     85     // var_dump($params);
     86     // die();
    8687    list($response, $apiKey) = $requestor->request('post', $url, $params);
    8788    //$this->refreshFrom(array('subscription' => $response), $apiKey, true);
  • pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Message.php

    r1230496 r1750125  
    3939   
    4040    $url = self::_scopedLsb($class, 'classUrl', $class);
     41
    4142   
    4243    list($response, $apiKey) = $requestor->request('post', $url, $params);
  • pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Product.php

    r1230496 r1750125  
    8383        "position" => $image['position']
    8484      );
     85
    8586      $requestor = new Pushpress_ApiRequestor($this->_apiKey);
    8687       
     
    101102        "inventory" => isset($option['inventory']) ? $option['inventory']: null,
    102103        "cost" => isset($option['cost']) ? $option['cost']: null,
     104        "adjustment_comment" => isset($option['adjustment_comment']) ? $option['adjustment_comment']: null,
    103105      );
     106
    104107      $requestor = new Pushpress_ApiRequestor($this->_apiKey);
    105108       
     
    134137    return $response;
    135138  }
     139
     140  public static function getOptionById($id) {
     141        $class = get_class();
     142        $url = self::classUrl($class);
     143        $url .= "/options/" . $id;
     144
     145        $requestor = new Pushpress_ApiRequestor();
     146     
     147        list($response, $apiKey) = $requestor->request('get', $url, $params);
     148        return self::scopedConstructFrom($class, $response, $apiKey);
     149       
     150    }
     151
    136152 
    137153}
  • pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Pushpress.php

    r1571482 r1750125  
    44  public static $apiKey;
    55  public static $apiBase = 'https://api.pushpress.com';
    6   public static $apiVersion = null;
     6  public static $apiVersion = "v1";
    77  public static $verifySslCerts = false;
    88  const VERSION = '1.0.0';
     
    4949    self::$verifySslCerts = $verify;
    5050  }
     51 
     52
    5153}
  • pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Token.php

    r1277063 r1750125  
    5050    $url .= "/pair";
    5151    $requestor = new Pushpress_ApiRequestor();
     52
     53    // echo $url;
     54    // var_dump($params);
     55    //die();
    5256     
    5357    list($response, $apiKey) = $requestor->request('post', $url, $params);
    5458    return self::scopedConstructFrom($class, $response, $apiKey);   
    5559  }
     60
     61 
    5662}
    5763
  • pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/TrackWorkout.php

    r1277063 r1750125  
    5959    return self::_scopedAll($class, $params, $apiKey);
    6060  }
     61
     62  public static function today($params=null, $apiKey=null) {
     63             
     64    $requestor = new Pushpress_ApiRequestor($this->_apiKey);
     65    $url = $this->instanceUrl() . '/today';
     66
     67       
     68    list($response, $apiKey) = $requestor->request('get', $url, $params);
     69    $this->refreshFrom($response, $apiKey);
     70    return $this;
     71  }
    6172 
    6273     
  • pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/User.php

    r1230496 r1750125  
    5050    return self::_scopedAll($class, $params, $apiKey);
    5151  }
     52
     53  public static function ping() {
     54    $class = get_class();
     55    $url = self::classUrl($class);
     56    $url .= "/ping";
     57    $requestor = new Pushpress_ApiRequestor();
     58       
     59    list($response, $apiKey) = $requestor->request('get', $url, $params);
     60    return self::scopedConstructFrom($class, $response, $apiKey);
     61
     62  }
    5263 
    5364    public static function auth($params=null) {
     
    6273    }
    6374   
    64     public static function resetPin($email=null) {
     75    public static function resetPin($params=null) {
    6576        $class = get_class();
    6677        $url = self::classUrl($class);
    67        
    68         $params['email'] = $email;
     78
     79        $p = array();
     80
     81        if (!is_array($params)) {
     82          $p['email'] = $params;         
     83        }
     84        else {
     85          $p = $params;
     86        }
     87        //$params['email'] = $email;
    6988       
    7089        $url .= "/pinreset/";
     90     
     91
    7192        $requestor = new Pushpress_ApiRequestor();
    7293       
    73         list($response, $apiKey) = $requestor->request('post', $url, $params);
     94        list($response, $apiKey) = $requestor->request('post', $url, $p);
     95        return self::scopedConstructFrom($class, $response, $apiKey);
     96    }
     97
     98    public static function setupEmail($params=null) {
     99        $class = get_class();
     100        $url = self::classUrl($class);
     101
     102        $p = array();
     103
     104        if (!is_array($params)) {
     105          $p['email'] = $params;         
     106        }
     107        else {
     108          $p = $params;
     109        }
     110        //$params['email'] = $email;
     111       
     112        $url .= "/setupemail/";
     113
     114        $requestor = new Pushpress_ApiRequestor();
     115       
     116        list($response, $apiKey) = $requestor->request('post', $url, $p);
    74117        return self::scopedConstructFrom($class, $response, $apiKey);
    75118    }
  • pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Util.php

    r1230496 r1750125  
    3939  public static function convertToPushpressObject($resp, $apiKey)
    4040  {
     41    //var_dump($resp);
    4142    $types = array(
    42       'card' => 'Pushpress_Card',
    43       'charge' => 'Pushpress_Charge',
     43      'application' => 'Pushpress_App',
     44      'billing' => 'Pushpress_Billing',
     45      'calendar' => 'Pushpress_Calendar',
     46      'calendar_item_rating' => 'Pushpress_CalendarItemRating',
     47      'checkin' => 'Pushpress_Checkin',
     48      'client' => 'Pushpress_Client',
     49      'contract' => 'Pushpress_Contract',
    4450      'customer' => 'Pushpress_Customer',
     51      'document' => 'Pushpress_Document',     
     52      'discount' => 'Pushpress_Discount',     
    4553      'list' => 'Pushpress_List',
    4654      'invoice' => 'Pushpress_Invoice',
    47       'invoiceitem' => 'Pushpress_InvoiceItem',
    48       'event' => 'Pushpress_Event',
    49       'transfer' => 'Pushpress_Transfer',
     55      'invoice_item' => 'Pushpress_InvoiceItem',
     56      'message' => 'Pushpress_Message',
     57      'order' => 'Pushpress_Order',
     58      'payrate' => 'Pushpress_PayRate',
    5059      'plan' => 'Pushpress_Plan',
    51       'recipient' => 'Pushpress_Recipient',
    52       'subscription' => 'Pushpress_Subscription'
     60      'preorder' => 'Pushpress_Preorder',
     61      'product' => 'Pushpress_Product',
     62      'product_category' => 'Pushpress_ProductCategories',
     63      'product_image' => 'Pushpress_ProductImages',
     64      'registration' => 'Pushpress_Registration',
     65      'scheduler_credit' => 'Pushpress_Scheduler_Credit',
     66      'scheduler_type' => 'Pushpress_Scheduler_Type',
     67      'scheduler_rate' => 'Pushpress_Scheduler_Rate',
     68      'subscription_contract' => 'Pushpress_SubscriptionContracts',
     69      'subscription' => 'Pushpress_Subscriptions',
     70      'sub_pay' => 'Pushpress_Subscription_Payroll',
     71      'tax_rate' => 'Pushpress_TaxRates',
     72      'token' => 'Pushpress_Token',
     73      'track' => 'Pushpress_Track',
     74      'track_benchmark' => 'Pushpress_Track_Benchmark',
     75      'track_benchmark_result' => 'Pushpress_Track_Benchmark_Result',
     76      'track_favorite_workout' => 'Pushpress_Track_Favorite_Workout',
     77      'track_score_type' => 'Pushpress_Track_Score_Type',
     78      'track_workout' => 'Pushpress_Track_Workout',
     79      'track_workout_type' => 'Pushpress_Track_Workout_Type',
     80      'user' => 'Pushpress_User',
     81      'user_tip' => 'Pushpress_UserTip',
     82      'user_document' => 'Pushpress_UserDocument',
     83      'user_image' => 'Pushpress_UserImage',
     84      'user_waiver' => 'Pushpress_UserWaiver',
    5385    );
    5486    if (self::isList($resp)) {
  • pushpress-integration/trunk/pushpress.php

    r1617941 r1750125  
    22/**
    33 * @package WP-PushPress
    4  * @version 1.6.2
     4 * @version 1.6.3
    55 */
    66/*
     
    99Description: Easily integrate your workouts, calendar, products, membership plans, events and more with your Wordpress blog!  This plugin is a free add-on for existing PushPress clients.  See https://pushpress.com for more info.
    1010Author: PushPress, Inc
    11 Version: 1.6.2
     11Version: 1.6.3
    1212Author URI: https://pushpress.com
    1313*/
    1414define('PUSHPRESS_LOCAL', FALSE);
    1515define('PUSHPRESS_DEV', FALSE);
    16 define( 'PP_PLUGIN_VERSION', '1.6.2');
     16define( 'PP_PLUGIN_VERSION', '1.6.3');
    1717define( 'PUSHPRESS_ERROR_REPORT', 0 );
    1818define( 'PUSHPRESS_BUTTON_CLASS',  'pushpress-button-class-' . rand(0, 10000));
     
    234234
    235235        function update_integration(){
     236
    236237            if( isset($_POST['save_pushpress_apikey_nonce']) && wp_verify_nonce($_POST['save_pushpress_apikey_nonce'], 'save_pushpress_apikey') && is_admin() ) {
    237238
     
    242243                    $recaptcha_sitekey = sanitize_text_field($_POST['recaptcha_sitekey']);
    243244                    $recaptcha_secretkey = sanitize_text_field($_POST['recaptcha_secretkey']);                 
    244 
    245245                    try {
    246246                        PushpressApi::setApiKey( $pushpressApikey );
    247247                        PushpressApi::setHost( PUSHPRESS_HOST );
    248248                        PushpressApi::setApiVersion( PUSHPRESS_VERSION );
    249                         $products = Pushpress_Product::all( array(
    250                             'active' => 1
    251                         ) );
    252                         $resultIntegration = true;
     249
     250                        $client = Pushpress_Client::retrieve('self');
     251                        $resultIntegration = true;                     
    253252                    } catch (Exception $e) {
    254253                        $resultIntegration = false;
  • pushpress-integration/trunk/readme.txt

    r1617931 r1750125  
    44Requires at least: 3.0.1
    55Tested up to: 4.6.1
    6 Stable tag: 1.6.2
     6Stable tag: 1.6.3
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6262= 1.6.1 and 1.6.2 =
    6363Debugging and small tweaks
     64
     65= 1.6.3 =
     66Fixed a newly introduced error on the lead form that was not using the preferences to setup the form.
Note: See TracChangeset for help on using the changeset viewer.