Plugin Directory

Changeset 1750155


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

fixing install issue with 1.6.3

Location:
pushpress-integration/trunk
Files:
19 edited

Legend:

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

    r1750125 r1750155  
    596596            // get integration settings
    597597            $integration_settings = Pushpress_Client::settings('lead_capture');
    598            
    599598            $integration_settings = $integration_settings->data;
    600599            /*
    601600            if (!$integration_settings = get_transient("pp_settings_lead_capture")) {
    602601                $integration_settings = Pushpress_Client::settings('lead_capture');
     602                $integration_settings = $integration_settings->data;
    603603                set_transient("pp_settings_lead_capture", $integration_settings, 300); // 5m
    604604            }
     
    857857            try {
    858858                $integration_settings = Pushpress_Client::settings('integration');
    859                 $integration_settings = $integration_settings->data;
    860859            }
    861860            catch (Exception $e) {
  • pushpress-integration/trunk/inc/wp_pushpress_shortcode.php

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

    r1750125 r1750155  
    3838
    3939// Pushpress API Resources
    40 require(dirname(__FILE__) . '/Pushpress/Activity.php');
    41 require(dirname(__FILE__) . '/Pushpress/App.php');
    4240require(dirname(__FILE__) . '/Pushpress/Billing.php');
    4341require(dirname(__FILE__) . '/Pushpress/Calendar.php');
    44 require(dirname(__FILE__) . '/Pushpress/CalendarItemRating.php');
    45 require(dirname(__FILE__) . '/Pushpress/CalendarType.php');
    4642require(dirname(__FILE__) . '/Pushpress/Checkin.php');
    4743require(dirname(__FILE__) . '/Pushpress/Client.php');
    4844require(dirname(__FILE__) . '/Pushpress/Contract.php');
    4945require(dirname(__FILE__) . '/Pushpress/Customer.php');
    50 require(dirname(__FILE__) . '/Pushpress/Document.php');
    5146require(dirname(__FILE__) . '/Pushpress/Discount.php');
    5247require(dirname(__FILE__) . '/Pushpress/Invoice.php');
    53 require(dirname(__FILE__) . '/Pushpress/InvoiceItem.php');
    5448require(dirname(__FILE__) . '/Pushpress/Message.php');
    55 require(dirname(__FILE__) . '/Pushpress/MessageLog.php');
    56 require(dirname(__FILE__) . '/Pushpress/MetricsCoach.php');
    5749require(dirname(__FILE__) . '/Pushpress/Order.php');
    58 require(dirname(__FILE__) . '/Pushpress/Partner.php');
    59 require(dirname(__FILE__) . '/Pushpress/Payrate.php');
    60 require(dirname(__FILE__) . '/Pushpress/PayrollItem.php');
    61 require(dirname(__FILE__) . '/Pushpress/PayrollReport.php');
    6250require(dirname(__FILE__) . '/Pushpress/Plan.php');
    63 require(dirname(__FILE__) . '/Pushpress/PlanCalendarItemType.php');
    64 require(dirname(__FILE__) . '/Pushpress/PlanCategory.php');
    6551require(dirname(__FILE__) . '/Pushpress/Preorder.php');
    6652require(dirname(__FILE__) . '/Pushpress/Product.php');
    6753require(dirname(__FILE__) . '/Pushpress/ProductCategories.php');
    6854require(dirname(__FILE__) . '/Pushpress/Registration.php');
    69 require(dirname(__FILE__) . '/Pushpress/Report.php');
    7055require(dirname(__FILE__) . '/Pushpress/User.php');
    71 require(dirname(__FILE__) . '/Pushpress/SchedulerCredit.php');
    72 require(dirname(__FILE__) . '/Pushpress/SchedulerType.php');
    73 require(dirname(__FILE__) . '/Pushpress/SchedulerRate.php');
    7456require(dirname(__FILE__) . '/Pushpress/Subscriptions.php');
    75 require(dirname(__FILE__) . '/Pushpress/SubscriptionPayroll.php');
    7657require(dirname(__FILE__) . '/Pushpress/SubscriptionContract.php');
    7758require(dirname(__FILE__) . '/Pushpress/TaxRates.php');
    7859require(dirname(__FILE__) . '/Pushpress/Token.php');
    7960require(dirname(__FILE__) . '/Pushpress/Track.php');
    80 require(dirname(__FILE__) . '/Pushpress/TrackBenchmark.php');
    81 require(dirname(__FILE__) . '/Pushpress/TrackBenchmarkResult.php');
    8261require(dirname(__FILE__) . '/Pushpress/TrackWorkout.php');
    8362require(dirname(__FILE__) . '/Pushpress/TrackFavoriteWorkout.php');
    8463require(dirname(__FILE__) . '/Pushpress/TrackScoringType.php');
    8564require(dirname(__FILE__) . '/Pushpress/TrackWorkoutType.php');
    86 require(dirname(__FILE__) . '/Pushpress/UserImage.php');
    87 require(dirname(__FILE__) . '/Pushpress/UserTip.php');
    8865require(dirname(__FILE__) . '/Pushpress/Waiver.php');
    8966require(dirname(__FILE__) . '/Pushpress/Workout.php');
    90 require(dirname(__FILE__) . '/Pushpress/UserDocument.php');
    9167require(dirname(__FILE__) . '/Pushpress/UserWaiver.php');
  • pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/ApiRequestor.php

    r1750125 r1750155  
    8181       
    8282    if (!is_array($resp) || !isset($resp['error']))
    83       throw new Pushpress_ApiError("There was an error: $rbody", $rcode, $rbody, $resp);
     83      throw new Pushpress_ApiError("Invalid response object from API: $rbody (HTTP response code was $rcode)", $rcode, $rbody, $resp);
    8484    $error = $resp['error'];
    8585    switch ($rcode) {
     
    106106    if (!$myApiKey)
    107107      $myApiKey = PushpressApi::$apiKey;
    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.');
     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.');
    114110
    115111   
     
    124120        'publisher' => 'pushpress',
    125121        'uname' => $uname);
    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    
     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));
    137125    if (PushpressApi::$apiVersion)
    138126      $headers[] = 'Pushpress-Version: ' . PushpressApi::$apiVersion;
    139127
    140     $headers[] = 'X-FORWARDED-FOR: ' . $_SERVER['REMOTE_ADDR'];
    141 
     128   
    142129    list($rbody, $rcode) = $this->_curlRequest($meth, $absUrl, $headers, $params);
    143130    return array($rbody, $rcode, $myApiKey);
     
    145132
    146133  private function _interpretResponse($rbody, $rcode)
    147   {     
    148    
    149     $rbody = str_replace("\&", "&", $rbody);
    150 
     134  {     
    151135    try {
    152136      $resp = json_decode($rbody, true);
     
    154138      throw new Pushpress_ApiError("Invalid response body from API: $rbody (HTTP response code was $rcode)", $rcode, $rbody);
    155139    }
    156 
     140   
    157141    if (!$resp) {
    158142        $resp = json_decode($rbody, true);
     
    174158      $opts[CURLOPT_HTTPGET] = 1;
    175159      if (count($params) > 0) {
    176            $encoded = self::encode($params);
    177            $absUrl = "$absUrl?$encoded";
     160    $encoded = self::encode($params);
     161    $absUrl = "$absUrl?$encoded";
    178162      }
    179163    } else if ($meth == 'post') {
     
    190174    }
    191175    else if ($meth == 'delete')  {
    192       $opts[CURLOPT_CUSTOMREQUEST] = "DELETE";
    193       $opts[CURLOPT_POSTFIELDS] = self::encode($params);
    194      
     176      $opts[CURLOPT_CUSTOMREQUEST] = 'DELETE';
    195177      if (count($params) > 0) {
    196            $encoded = self::encode($params);
    197            $absUrl = "$absUrl?$encoded";
    198         }
     178    $encoded = self::encode($params);
     179    $absUrl = "$absUrl?$encoded";
     180      }
    199181    } else {
    200182      throw new Pushpress_ApiError("Unrecognized method $meth");
     
    227209    }
    228210
    229    
    230211   
    231212   
  • pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/ApiResource.php

    r1750125 r1750155  
    99      throw new Pushpress_Error("You must pass an value Identifer into the retrieve function to get an object.");
    1010    }
    11 
    1211    $instance = new $class($id, $apiKey);
    1312    $instance->refresh($params);
     
    5857    $requestor = new Pushpress_ApiRequestor($this->_apiKey);
    5958    $url = $this->emptyUrl();
    60     // echo $url;
    61     // die();
    6259    list($response, $apiKey) = $requestor->request('get', $url, $this->_retrieveOptions);
    6360    $this->refreshFrom($response, $apiKey);
     
    106103    public function instanceUrl()
    107104    {
    108         $id = $this['id'];
    109 
    110         if (!$id) {
    111           $id = $this['uuid'];
    112         }   
     105        $id = $this['id'];   
    113106        $class = get_class($this);
    114107    $id = Pushpress_ApiRequestor::utf8($id);
     
    175168    $requestor = new Pushpress_ApiRequestor($apiKey);
    176169    $url = self::_scopedLsb($class, 'classUrl', $class);
    177     $url = preg_replace("/(ss)$/", "s", $url);
    178     // echo $url;
    179 //      echo '<br>';
    180   //    var_dump($params);
    181     //die();
     170    $url = preg_replace("/(ss)$/", "s", $url);   
    182171    list($response, $apiKey) = $requestor->request('post', $url, $params);
    183172    return Pushpress_Util::convertToPushpressObject($response, $apiKey);
     
    192181    if (count($params) > 0) {
    193182      $url = $this->instanceUrl();
    194       // echo "<br>URL: " . $url;
    195       // echo "<br>params:<br>";
    196       // var_dump($params);
    197       // die();
    198 
     183     
    199184      list($response, $apiKey) = $requestor->request('post', $url, $params);
    200185      $this->refreshFrom($response, $apiKey);
     
    208193    $requestor = new Pushpress_ApiRequestor($this->_apiKey);
    209194    $params = $this->serializeParameters();
    210 
     195   
    211196    if (count($params) > 0) {
    212197      $url = $this->instanceUrl();
    213 
    214       // echo 'URL ' . $url;
    215       // echo 'PRARAMS:<br>';var_dump($params);
    216       // die();
    217 
    218198      list($response, $apiKey) = $requestor->request('put', $url, $params);
    219199      $this->refreshFrom($response, $apiKey);
     
    227207    $requestor = new Pushpress_ApiRequestor($this->_apiKey);
    228208    $url = $this->instanceUrl();
    229 
    230     //echo $url;
    231     //var_dump($params);
    232     //die();
    233 
     209   
    234210    list($response, $apiKey) = $requestor->request('delete', $url, $params);
    235211    $this->refreshFrom($response, $apiKey);
    236212    return $this;
    237213  }
    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   }
    258214}
  • pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Billing.php

    r1750125 r1750155  
    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 
    7540  public static function all($params=null, $apiKey=null)
    7641  {
  • pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Client.php

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

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

    r1750125 r1750155  
    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   }
    8677   
    8778    public function leadfunnel($params=null, $apiKey=null) {
     
    9990        $requestor = new Pushpress_ApiRequestor($this->_apiKey);
    10091        $url = $this->instanceUrl() . '/leadfunnel';
    101             list($response, $apiKey) = $requestor->request('post', $url, $params);
     92        list($response, $apiKey) = $requestor->request('post', $url, $params);
    10293        $this->refreshFrom($response, $apiKey);
    10394       
    104             return $this;
     95        return $this;
    10596    }
    10697   
     
    124115        return $this;
    125116    }
    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    
    156117       
    157118}
  • pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Invoice.php

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

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

    r1750125 r1750155  
    8383        "position" => $image['position']
    8484      );
    85 
    8685      $requestor = new Pushpress_ApiRequestor($this->_apiKey);
    8786       
     
    102101        "inventory" => isset($option['inventory']) ? $option['inventory']: null,
    103102        "cost" => isset($option['cost']) ? $option['cost']: null,
    104         "adjustment_comment" => isset($option['adjustment_comment']) ? $option['adjustment_comment']: null,
    105103      );
    106 
    107104      $requestor = new Pushpress_ApiRequestor($this->_apiKey);
    108105       
     
    137134    return $response;
    138135  }
    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 
    152136 
    153137}
  • pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Pushpress.php

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

    r1750125 r1750155  
    5050    $url .= "/pair";
    5151    $requestor = new Pushpress_ApiRequestor();
    52 
    53     // echo $url;
    54     // var_dump($params);
    55     //die();
    5652     
    5753    list($response, $apiKey) = $requestor->request('post', $url, $params);
    5854    return self::scopedConstructFrom($class, $response, $apiKey);   
    5955  }
    60 
    61  
    6256}
    6357
  • pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/TrackWorkout.php

    r1750125 r1750155  
    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   }
    7261 
    7362     
  • pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/User.php

    r1750125 r1750155  
    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   }
    6352 
    6453    public static function auth($params=null) {
     
    7362    }
    7463   
    75     public static function resetPin($params=null) {
     64    public static function resetPin($email=null) {
    7665        $class = get_class();
    7766        $url = self::classUrl($class);
    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;
     67       
     68        $params['email'] = $email;
    8869       
    8970        $url .= "/pinreset/";
    90      
    91 
    9271        $requestor = new Pushpress_ApiRequestor();
    9372       
    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);
     73        list($response, $apiKey) = $requestor->request('post', $url, $params);
    11774        return self::scopedConstructFrom($class, $response, $apiKey);
    11875    }
  • pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Util.php

    r1750125 r1750155  
    3939  public static function convertToPushpressObject($resp, $apiKey)
    4040  {
    41     //var_dump($resp);
    4241    $types = array(
    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',
     42      'card' => 'Pushpress_Card',
     43      'charge' => 'Pushpress_Charge',
    5044      'customer' => 'Pushpress_Customer',
    51       'document' => 'Pushpress_Document',     
    52       'discount' => 'Pushpress_Discount',     
    5345      'list' => 'Pushpress_List',
    5446      'invoice' => 'Pushpress_Invoice',
    55       'invoice_item' => 'Pushpress_InvoiceItem',
    56       'message' => 'Pushpress_Message',
    57       'order' => 'Pushpress_Order',
    58       'payrate' => 'Pushpress_PayRate',
     47      'invoiceitem' => 'Pushpress_InvoiceItem',
     48      'event' => 'Pushpress_Event',
     49      'transfer' => 'Pushpress_Transfer',
    5950      'plan' => 'Pushpress_Plan',
    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',
     51      'recipient' => 'Pushpress_Recipient',
     52      'subscription' => 'Pushpress_Subscription'
    8553    );
    8654    if (self::isList($resp)) {
  • pushpress-integration/trunk/pushpress.php

    r1750125 r1750155  
    22/**
    33 * @package WP-PushPress
    4  * @version 1.6.3
     4 * @version 1.6.4
    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.3
    12 Author URI: https://pushpress.com
     11Version: 1.6.4
     12Author URI: http://pushpress.com
    1313*/
    1414define('PUSHPRESS_LOCAL', FALSE);
    1515define('PUSHPRESS_DEV', FALSE);
    16 define( 'PP_PLUGIN_VERSION', '1.6.3');
     16define( 'PP_PLUGIN_VERSION', '1.6.4');
    1717define( 'PUSHPRESS_ERROR_REPORT', 0 );
    1818define( 'PUSHPRESS_BUTTON_CLASS',  'pushpress-button-class-' . rand(0, 10000));
     
    234234
    235235        function update_integration(){
    236 
    237236            if( isset($_POST['save_pushpress_apikey_nonce']) && wp_verify_nonce($_POST['save_pushpress_apikey_nonce'], 'save_pushpress_apikey') && is_admin() ) {
    238237
     
    243242                    $recaptcha_sitekey = sanitize_text_field($_POST['recaptcha_sitekey']);
    244243                    $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 
    250                         $client = Pushpress_Client::retrieve('self');
    251                         $resultIntegration = true;                     
     249                        $products = Pushpress_Product::all( array(
     250                            'active' => 1
     251                        ) );
     252                        $resultIntegration = true;
    252253                    } catch (Exception $e) {
    253254                        $resultIntegration = false;
  • pushpress-integration/trunk/readme.txt

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