Changeset 1750155
- Timestamp:
- 10/20/2017 09:33:40 PM (8 years ago)
- Location:
- pushpress-integration/trunk
- Files:
-
- 19 edited
-
inc/wp_pushpress_model.php (modified) (2 diffs)
-
inc/wp_pushpress_shortcode.php (modified) (1 diff)
-
lib/php-sdk/lib/Pushpress.php (modified) (1 diff)
-
lib/php-sdk/lib/Pushpress/ApiRequestor.php (modified) (8 diffs)
-
lib/php-sdk/lib/Pushpress/ApiResource.php (modified) (7 diffs)
-
lib/php-sdk/lib/Pushpress/Billing.php (modified) (1 diff)
-
lib/php-sdk/lib/Pushpress/Client.php (modified) (1 diff)
-
lib/php-sdk/lib/Pushpress/Contract.php (modified) (1 diff)
-
lib/php-sdk/lib/Pushpress/Customer.php (modified) (3 diffs)
-
lib/php-sdk/lib/Pushpress/Invoice.php (modified) (1 diff)
-
lib/php-sdk/lib/Pushpress/Message.php (modified) (1 diff)
-
lib/php-sdk/lib/Pushpress/Product.php (modified) (3 diffs)
-
lib/php-sdk/lib/Pushpress/Pushpress.php (modified) (2 diffs)
-
lib/php-sdk/lib/Pushpress/Token.php (modified) (1 diff)
-
lib/php-sdk/lib/Pushpress/TrackWorkout.php (modified) (1 diff)
-
lib/php-sdk/lib/Pushpress/User.php (modified) (2 diffs)
-
lib/php-sdk/lib/Pushpress/Util.php (modified) (1 diff)
-
pushpress.php (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pushpress-integration/trunk/inc/wp_pushpress_model.php
r1750125 r1750155 596 596 // get integration settings 597 597 $integration_settings = Pushpress_Client::settings('lead_capture'); 598 599 598 $integration_settings = $integration_settings->data; 600 599 /* 601 600 if (!$integration_settings = get_transient("pp_settings_lead_capture")) { 602 601 $integration_settings = Pushpress_Client::settings('lead_capture'); 602 $integration_settings = $integration_settings->data; 603 603 set_transient("pp_settings_lead_capture", $integration_settings, 300); // 5m 604 604 } … … 857 857 try { 858 858 $integration_settings = Pushpress_Client::settings('integration'); 859 $integration_settings = $integration_settings->data;860 859 } 861 860 catch (Exception $e) { -
pushpress-integration/trunk/inc/wp_pushpress_shortcode.php
r1750125 r1750155 185 185 186 186 if( !$client = get_transient( 'pp_client2' ) ){ 187 echo "<br><br>Getting Client from API"; 187 188 try { 188 189 $client = Pushpress_Client::retrieve('self'); -
pushpress-integration/trunk/lib/php-sdk/lib/Pushpress.php
r1750125 r1750155 38 38 39 39 // Pushpress API Resources 40 require(dirname(__FILE__) . '/Pushpress/Activity.php');41 require(dirname(__FILE__) . '/Pushpress/App.php');42 40 require(dirname(__FILE__) . '/Pushpress/Billing.php'); 43 41 require(dirname(__FILE__) . '/Pushpress/Calendar.php'); 44 require(dirname(__FILE__) . '/Pushpress/CalendarItemRating.php');45 require(dirname(__FILE__) . '/Pushpress/CalendarType.php');46 42 require(dirname(__FILE__) . '/Pushpress/Checkin.php'); 47 43 require(dirname(__FILE__) . '/Pushpress/Client.php'); 48 44 require(dirname(__FILE__) . '/Pushpress/Contract.php'); 49 45 require(dirname(__FILE__) . '/Pushpress/Customer.php'); 50 require(dirname(__FILE__) . '/Pushpress/Document.php');51 46 require(dirname(__FILE__) . '/Pushpress/Discount.php'); 52 47 require(dirname(__FILE__) . '/Pushpress/Invoice.php'); 53 require(dirname(__FILE__) . '/Pushpress/InvoiceItem.php');54 48 require(dirname(__FILE__) . '/Pushpress/Message.php'); 55 require(dirname(__FILE__) . '/Pushpress/MessageLog.php');56 require(dirname(__FILE__) . '/Pushpress/MetricsCoach.php');57 49 require(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');62 50 require(dirname(__FILE__) . '/Pushpress/Plan.php'); 63 require(dirname(__FILE__) . '/Pushpress/PlanCalendarItemType.php');64 require(dirname(__FILE__) . '/Pushpress/PlanCategory.php');65 51 require(dirname(__FILE__) . '/Pushpress/Preorder.php'); 66 52 require(dirname(__FILE__) . '/Pushpress/Product.php'); 67 53 require(dirname(__FILE__) . '/Pushpress/ProductCategories.php'); 68 54 require(dirname(__FILE__) . '/Pushpress/Registration.php'); 69 require(dirname(__FILE__) . '/Pushpress/Report.php');70 55 require(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');74 56 require(dirname(__FILE__) . '/Pushpress/Subscriptions.php'); 75 require(dirname(__FILE__) . '/Pushpress/SubscriptionPayroll.php');76 57 require(dirname(__FILE__) . '/Pushpress/SubscriptionContract.php'); 77 58 require(dirname(__FILE__) . '/Pushpress/TaxRates.php'); 78 59 require(dirname(__FILE__) . '/Pushpress/Token.php'); 79 60 require(dirname(__FILE__) . '/Pushpress/Track.php'); 80 require(dirname(__FILE__) . '/Pushpress/TrackBenchmark.php');81 require(dirname(__FILE__) . '/Pushpress/TrackBenchmarkResult.php');82 61 require(dirname(__FILE__) . '/Pushpress/TrackWorkout.php'); 83 62 require(dirname(__FILE__) . '/Pushpress/TrackFavoriteWorkout.php'); 84 63 require(dirname(__FILE__) . '/Pushpress/TrackScoringType.php'); 85 64 require(dirname(__FILE__) . '/Pushpress/TrackWorkoutType.php'); 86 require(dirname(__FILE__) . '/Pushpress/UserImage.php');87 require(dirname(__FILE__) . '/Pushpress/UserTip.php');88 65 require(dirname(__FILE__) . '/Pushpress/Waiver.php'); 89 66 require(dirname(__FILE__) . '/Pushpress/Workout.php'); 90 require(dirname(__FILE__) . '/Pushpress/UserDocument.php');91 67 require(dirname(__FILE__) . '/Pushpress/UserWaiver.php'); -
pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/ApiRequestor.php
r1750125 r1750155 81 81 82 82 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); 84 84 $error = $resp['error']; 85 85 switch ($rcode) { … … 106 106 if (!$myApiKey) 107 107 $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.'); 114 110 115 111 … … 124 120 'publisher' => 'pushpress', 125 121 '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)); 137 125 if (PushpressApi::$apiVersion) 138 126 $headers[] = 'Pushpress-Version: ' . PushpressApi::$apiVersion; 139 127 140 $headers[] = 'X-FORWARDED-FOR: ' . $_SERVER['REMOTE_ADDR']; 141 128 142 129 list($rbody, $rcode) = $this->_curlRequest($meth, $absUrl, $headers, $params); 143 130 return array($rbody, $rcode, $myApiKey); … … 145 132 146 133 private function _interpretResponse($rbody, $rcode) 147 { 148 149 $rbody = str_replace("\&", "&", $rbody); 150 134 { 151 135 try { 152 136 $resp = json_decode($rbody, true); … … 154 138 throw new Pushpress_ApiError("Invalid response body from API: $rbody (HTTP response code was $rcode)", $rcode, $rbody); 155 139 } 156 140 157 141 if (!$resp) { 158 142 $resp = json_decode($rbody, true); … … 174 158 $opts[CURLOPT_HTTPGET] = 1; 175 159 if (count($params) > 0) { 176 $encoded = self::encode($params);177 $absUrl = "$absUrl?$encoded";160 $encoded = self::encode($params); 161 $absUrl = "$absUrl?$encoded"; 178 162 } 179 163 } else if ($meth == 'post') { … … 190 174 } 191 175 else if ($meth == 'delete') { 192 $opts[CURLOPT_CUSTOMREQUEST] = "DELETE"; 193 $opts[CURLOPT_POSTFIELDS] = self::encode($params); 194 176 $opts[CURLOPT_CUSTOMREQUEST] = 'DELETE'; 195 177 if (count($params) > 0) { 196 $encoded = self::encode($params);197 $absUrl = "$absUrl?$encoded";198 }178 $encoded = self::encode($params); 179 $absUrl = "$absUrl?$encoded"; 180 } 199 181 } else { 200 182 throw new Pushpress_ApiError("Unrecognized method $meth"); … … 227 209 } 228 210 229 230 211 231 212 -
pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/ApiResource.php
r1750125 r1750155 9 9 throw new Pushpress_Error("You must pass an value Identifer into the retrieve function to get an object."); 10 10 } 11 12 11 $instance = new $class($id, $apiKey); 13 12 $instance->refresh($params); … … 58 57 $requestor = new Pushpress_ApiRequestor($this->_apiKey); 59 58 $url = $this->emptyUrl(); 60 // echo $url;61 // die();62 59 list($response, $apiKey) = $requestor->request('get', $url, $this->_retrieveOptions); 63 60 $this->refreshFrom($response, $apiKey); … … 106 103 public function instanceUrl() 107 104 { 108 $id = $this['id']; 109 110 if (!$id) { 111 $id = $this['uuid']; 112 } 105 $id = $this['id']; 113 106 $class = get_class($this); 114 107 $id = Pushpress_ApiRequestor::utf8($id); … … 175 168 $requestor = new Pushpress_ApiRequestor($apiKey); 176 169 $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); 182 171 list($response, $apiKey) = $requestor->request('post', $url, $params); 183 172 return Pushpress_Util::convertToPushpressObject($response, $apiKey); … … 192 181 if (count($params) > 0) { 193 182 $url = $this->instanceUrl(); 194 // echo "<br>URL: " . $url; 195 // echo "<br>params:<br>"; 196 // var_dump($params); 197 // die(); 198 183 199 184 list($response, $apiKey) = $requestor->request('post', $url, $params); 200 185 $this->refreshFrom($response, $apiKey); … … 208 193 $requestor = new Pushpress_ApiRequestor($this->_apiKey); 209 194 $params = $this->serializeParameters(); 210 195 211 196 if (count($params) > 0) { 212 197 $url = $this->instanceUrl(); 213 214 // echo 'URL ' . $url;215 // echo 'PRARAMS:<br>';var_dump($params);216 // die();217 218 198 list($response, $apiKey) = $requestor->request('put', $url, $params); 219 199 $this->refreshFrom($response, $apiKey); … … 227 207 $requestor = new Pushpress_ApiRequestor($this->_apiKey); 228 208 $url = $this->instanceUrl(); 229 230 //echo $url; 231 //var_dump($params); 232 //die(); 233 209 234 210 list($response, $apiKey) = $requestor->request('delete', $url, $params); 235 211 $this->refreshFrom($response, $apiKey); 236 212 return $this; 237 213 } 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" => $params252 );253 }254 list($response, $apiKey) = $requestor->request('post', $url, $p);255 256 return Pushpress_Util::convertToPushpressObject($response, $apiKey);257 }258 214 } -
pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Billing.php
r1750125 r1750155 38 38 } 39 39 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 75 40 public static function all($params=null, $apiKey=null) 76 41 { -
pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Client.php
r1750125 r1750155 51 51 $url .= "/settings/$type"; 52 52 $requestor = new Pushpress_ApiRequestor(); 53 // $x = $requestor->request('get', $url); 53 54 list($response, $apiKey) = $requestor->request('get', $url); 54 55 return Pushpress_Util::convertToPushpressObject($response, $apiKey); 55 } 56 //list($response, $apiKey) = $requestor->request('get', $url); 57 //return self::scopedConstructFrom($class, $response, $apiKey); 58 59 } 56 60 57 61 public static function referralSources() { -
pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Contract.php
r1750125 r1750155 1 1 <?php 2 2 3 class Pushpress_Contract extends Pushpress_ApiResource3 class Pushpress_Contracts extends Pushpress_ApiResource 4 4 { 5 5 -
pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Customer.php
r1750125 r1750155 75 75 return $this; 76 76 } 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 }86 77 87 78 public function leadfunnel($params=null, $apiKey=null) { … … 99 90 $requestor = new Pushpress_ApiRequestor($this->_apiKey); 100 91 $url = $this->instanceUrl() . '/leadfunnel'; 101 list($response, $apiKey) = $requestor->request('post', $url, $params);92 list($response, $apiKey) = $requestor->request('post', $url, $params); 102 93 $this->refreshFrom($response, $apiKey); 103 94 104 return $this;95 return $this; 105 96 } 106 97 … … 124 115 return $this; 125 116 } 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 156 117 157 118 } -
pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Invoice.php
r1750125 r1750155 79 79 public function charge($params=array()) { 80 80 $url = $this->instanceUrl() . '/charge'; 81 82 81 $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(); 87 86 list($response, $apiKey) = $requestor->request('post', $url, $params); 88 87 //$this->refreshFrom(array('subscription' => $response), $apiKey, true); -
pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Message.php
r1750125 r1750155 39 39 40 40 $url = self::_scopedLsb($class, 'classUrl', $class); 41 42 41 43 42 list($response, $apiKey) = $requestor->request('post', $url, $params); -
pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Product.php
r1750125 r1750155 83 83 "position" => $image['position'] 84 84 ); 85 86 85 $requestor = new Pushpress_ApiRequestor($this->_apiKey); 87 86 … … 102 101 "inventory" => isset($option['inventory']) ? $option['inventory']: null, 103 102 "cost" => isset($option['cost']) ? $option['cost']: null, 104 "adjustment_comment" => isset($option['adjustment_comment']) ? $option['adjustment_comment']: null,105 103 ); 106 107 104 $requestor = new Pushpress_ApiRequestor($this->_apiKey); 108 105 … … 137 134 return $response; 138 135 } 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 152 136 153 137 } -
pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Pushpress.php
r1750125 r1750155 4 4 public static $apiKey; 5 5 public static $apiBase = 'https://api.pushpress.com'; 6 public static $apiVersion = "v1";6 public static $apiVersion = null; 7 7 public static $verifySslCerts = false; 8 8 const VERSION = '1.0.0'; … … 49 49 self::$verifySslCerts = $verify; 50 50 } 51 52 53 51 } -
pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Token.php
r1750125 r1750155 50 50 $url .= "/pair"; 51 51 $requestor = new Pushpress_ApiRequestor(); 52 53 // echo $url;54 // var_dump($params);55 //die();56 52 57 53 list($response, $apiKey) = $requestor->request('post', $url, $params); 58 54 return self::scopedConstructFrom($class, $response, $apiKey); 59 55 } 60 61 62 56 } 63 57 -
pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/TrackWorkout.php
r1750125 r1750155 59 59 return self::_scopedAll($class, $params, $apiKey); 60 60 } 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 }72 61 73 62 -
pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/User.php
r1750125 r1750155 50 50 return self::_scopedAll($class, $params, $apiKey); 51 51 } 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 }63 52 64 53 public static function auth($params=null) { … … 73 62 } 74 63 75 public static function resetPin($ params=null) {64 public static function resetPin($email=null) { 76 65 $class = get_class(); 77 66 $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; 88 69 89 70 $url .= "/pinreset/"; 90 91 92 71 $requestor = new Pushpress_ApiRequestor(); 93 72 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); 117 74 return self::scopedConstructFrom($class, $response, $apiKey); 118 75 } -
pushpress-integration/trunk/lib/php-sdk/lib/Pushpress/Util.php
r1750125 r1750155 39 39 public static function convertToPushpressObject($resp, $apiKey) 40 40 { 41 //var_dump($resp);42 41 $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', 50 44 'customer' => 'Pushpress_Customer', 51 'document' => 'Pushpress_Document',52 'discount' => 'Pushpress_Discount',53 45 'list' => 'Pushpress_List', 54 46 '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', 59 50 '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' 85 53 ); 86 54 if (self::isList($resp)) { -
pushpress-integration/trunk/pushpress.php
r1750125 r1750155 2 2 /** 3 3 * @package WP-PushPress 4 * @version 1.6. 34 * @version 1.6.4 5 5 */ 6 6 /* … … 9 9 Description: 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. 10 10 Author: PushPress, Inc 11 Version: 1.6. 312 Author URI: http s://pushpress.com11 Version: 1.6.4 12 Author URI: http://pushpress.com 13 13 */ 14 14 define('PUSHPRESS_LOCAL', FALSE); 15 15 define('PUSHPRESS_DEV', FALSE); 16 define( 'PP_PLUGIN_VERSION', '1.6. 3');16 define( 'PP_PLUGIN_VERSION', '1.6.4'); 17 17 define( 'PUSHPRESS_ERROR_REPORT', 0 ); 18 18 define( 'PUSHPRESS_BUTTON_CLASS', 'pushpress-button-class-' . rand(0, 10000)); … … 234 234 235 235 function update_integration(){ 236 237 236 if( isset($_POST['save_pushpress_apikey_nonce']) && wp_verify_nonce($_POST['save_pushpress_apikey_nonce'], 'save_pushpress_apikey') && is_admin() ) { 238 237 … … 243 242 $recaptcha_sitekey = sanitize_text_field($_POST['recaptcha_sitekey']); 244 243 $recaptcha_secretkey = sanitize_text_field($_POST['recaptcha_secretkey']); 244 245 245 try { 246 246 PushpressApi::setApiKey( $pushpressApikey ); 247 247 PushpressApi::setHost( PUSHPRESS_HOST ); 248 248 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; 252 253 } catch (Exception $e) { 253 254 $resultIntegration = false; -
pushpress-integration/trunk/readme.txt
r1750125 r1750155 4 4 Requires at least: 3.0.1 5 5 Tested up to: 4.6.1 6 Stable tag: 1.6. 36 Stable tag: 1.6.4 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 63 63 Debugging and small tweaks 64 64 65 = 1.6.3 =66 Fix ed 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 = 66 Fixing Lead form and installation issues.
Note: See TracChangeset
for help on using the changeset viewer.