Plugin Directory

Changeset 1576771


Ignore:
Timestamp:
01/17/2017 07:37:23 PM (9 years ago)
Author:
pushpress
Message:

Tagging version 1.5.11

Location:
pushpress-integration
Files:
12 edited
1 copied

Legend:

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

    r1571482 r1576771  
    3232        $productsList = array();
    3333
    34         foreach ($productsObj['data'] as $product) {
     34        foreach ($productsObj->data as $product) {
    3535                //get categories
    3636                $catId = $product->category->uuid;
     
    6868            $client = $this->getClient();
    6969            $timeNow = LocalTime::toGM($client);
    70             foreach ($livePreorders['data'] as $product) {
     70            foreach ($livePreorders->data as $product) {
    7171
    7272                if ($product->end_timestamp >= $timeNow) {
     
    138138
    139139
    140         foreach ($productsObj['data'] as $product) {
     140        foreach ($productsObj->data as $product) {
    141141            if ($product->is_public) {
    142142                //get categories
     
    180180
    181181           
    182         foreach ($plans['data'] as $plan) {
     182        foreach ($plans->data as $plan) {
    183183            $plansList[$plan->type][$plan->uuid]['name'] = $plan->name;
    184184            $plansList[$plan->type][$plan->uuid]['price'] = $plan->amount;
     
    223223        }       
    224224       
    225         foreach ($plans['data'] as $plan) {
     225        foreach ($plans->data as $plan) {
    226226            $plansList[$plan->slug] = $plan->name;
    227227        }
     
    243243            set_transient($key, $items, 600);
    244244        }
    245         foreach ($items['data'] as $item) {
     245        foreach ($items->data as $item) {
    246246            $categories[$item->uuid] = mb_convert_encoding($item->name, 'UTF-8', 'HTML-ENTITIES');
    247247        }
     
    275275        $eventsList = array();
    276276   
    277         foreach ($calendar['data'] as $item) {
     277        foreach ($calendar->data as $item) {
    278278            if (($item->doy) >= $doy) {
    279279                $eventsList[$item->uuid]['title'] = $item->title;
     
    322322                        'end_time' => $end
    323323            ));
    324             foreach ($calendar['data'] as $item) {
     324            foreach ($calendar->data as $item) {
    325325                if (($item->doy) >= $doy) {
    326326                    $eventsList[$item->uuid] = $item->title;
     
    363363            }
    364364       
    365             foreach ($calendar['data'] as $item) {
     365            foreach ($calendar->data as $item) {
    366366               
    367367                if (($item->doy) >= $doy) {
     
    419419                       
    420420            $results = array();
    421             foreach ($tracks['data'] as $key => $track) {
     421            foreach ($tracks->data as $key => $track) {
    422422                //check public to wordpress plugin
    423423                if($track->publish_wordpress){
     
    451451       
    452452        $workoutList = array();
    453         foreach ($workouts['data'] as $item) {
     453        foreach ($workouts->data as $item) {
    454454            $public_day = $public_setting['publish_day'];
    455455            $public_time = $public_setting['publish_time'];
     
    501501            }           
    502502
    503             foreach ($referral_sources['data'] as $item) {
     503            foreach ($referral_sources->data as $item) {
    504504                $referral[] = array('id' => $item['id'], 'name' => $item['name'], 'show_staff_list' => $item['show_staff_list']);
    505505            }
     
    696696                        'end_time' => $end
    697697            ));
    698             foreach ($calendar['data'] as $item) {
     698            foreach ($calendar->data as $item) {
    699699                if (($item->doy) >= $doy) {
    700700                    if ($item->uuid == $id) {
     
    718718            //get all products object
    719719            $plans = Pushpress_Plan::all($params);
    720             foreach ($plans['data'] as $plan) {
     720            foreach ($plans->data as $plan) {
    721721                if ($plan->slug == $id) {
    722722                    return TRUE;
  • pushpress-integration/tags/1.5.11/inc/wp_pushpress_shortcode.php

    r1571482 r1576771  
    180180        if( !$client = get_transient( 'pp_client2' ) ){
    181181            echo "<br><br>Getting Client from API";
    182             $client = Pushpress_Client::retrieve('self');
     182            try {
     183                $client = Pushpress_Client::retrieve('self');
     184            }
     185            catch(Exception $e) {
     186               
     187            }
    183188            set_transient( 'pp_client2', $client, 3600 ); // 1 hour cache               
    184189        }   
  • pushpress-integration/tags/1.5.11/pushpress.php

    r1571482 r1576771  
    22/**
    33 * @package WP-PushPress
    4  * @version 1.5.10
     4 * @version 1.5.11
    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.5.10
     11Version: 1.5.11
    1212Author URI: https://pushpress.com
    1313*/
    1414define('PUSHPRESS_LOCAL', FALSE);
    1515define('PUSHPRESS_DEV', FALSE);
    16 define( 'PP_PLUGIN_VERSION', '1.5.10');
     16define( 'PP_PLUGIN_VERSION', '1.5.11');
    1717define( 'PUSHPRESS_ERROR_REPORT', 0 );
    1818define( 'PUSHPRESS_BUTTON_CLASS',  'pushpress-button-class-' . rand(0, 10000));
  • pushpress-integration/tags/1.5.11/readme.txt

    r1571488 r1576771  
    44Requires at least: 3.0.1
    55Tested up to: 4.6.1
    6 Stable tag: 1.5.10
     6Stable tag: 1.5.11
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    123123= 1.5.10 =
    124124Fixed issue causing some systems to hang up / freeze due to output of characters before the <!DOCTYPE>
     125
     126= 1.5.11 =
     127Found an issue affecting *some* PHP versions / hosting providers in how they were treating the data being returned from our API.  This was causing white screens of death on our pages. Fixed the issue for those affected.
  • pushpress-integration/tags/1.5.11/templates/frontend/shortcode_leads.php

    r1571482 r1576771  
    135135                        foreach ($staff as $s) {
    136136                            $selected = '';
    137                             if ($s->uuid == $form['referred_by_user_id']) {
     137                            if (isset($form['referred_by_user_id']) && ($s->uuid == $form['referred_by_user_id'])) {
    138138                                $selected = 'selected';
    139139                            } 
  • pushpress-integration/tags/1.5.11/templates/frontend/shortcode_workouts.php

    r1299350 r1576771  
    2121        <h2><?php echo $workout['track_name']; ?></h2>
    2222        <div class="wp-pushpress-list">
    23             <?php if (count($workout['data']) > 0): ?>
    24                 <?php foreach ($workout['data'] as $key => $item): ?>                           
     23            <?php if (count($workout->data) > 0): ?>
     24                <?php foreach ($workout->data as $key => $item): ?>                         
    2525                    <div class="item-other">
    2626                        <h3><?php echo $item['type']; ?>
  • pushpress-integration/trunk/inc/wp_pushpress_model.php

    r1571482 r1576771  
    3232        $productsList = array();
    3333
    34         foreach ($productsObj['data'] as $product) {
     34        foreach ($productsObj->data as $product) {
    3535                //get categories
    3636                $catId = $product->category->uuid;
     
    6868            $client = $this->getClient();
    6969            $timeNow = LocalTime::toGM($client);
    70             foreach ($livePreorders['data'] as $product) {
     70            foreach ($livePreorders->data as $product) {
    7171
    7272                if ($product->end_timestamp >= $timeNow) {
     
    138138
    139139
    140         foreach ($productsObj['data'] as $product) {
     140        foreach ($productsObj->data as $product) {
    141141            if ($product->is_public) {
    142142                //get categories
     
    180180
    181181           
    182         foreach ($plans['data'] as $plan) {
     182        foreach ($plans->data as $plan) {
    183183            $plansList[$plan->type][$plan->uuid]['name'] = $plan->name;
    184184            $plansList[$plan->type][$plan->uuid]['price'] = $plan->amount;
     
    223223        }       
    224224       
    225         foreach ($plans['data'] as $plan) {
     225        foreach ($plans->data as $plan) {
    226226            $plansList[$plan->slug] = $plan->name;
    227227        }
     
    243243            set_transient($key, $items, 600);
    244244        }
    245         foreach ($items['data'] as $item) {
     245        foreach ($items->data as $item) {
    246246            $categories[$item->uuid] = mb_convert_encoding($item->name, 'UTF-8', 'HTML-ENTITIES');
    247247        }
     
    275275        $eventsList = array();
    276276   
    277         foreach ($calendar['data'] as $item) {
     277        foreach ($calendar->data as $item) {
    278278            if (($item->doy) >= $doy) {
    279279                $eventsList[$item->uuid]['title'] = $item->title;
     
    322322                        'end_time' => $end
    323323            ));
    324             foreach ($calendar['data'] as $item) {
     324            foreach ($calendar->data as $item) {
    325325                if (($item->doy) >= $doy) {
    326326                    $eventsList[$item->uuid] = $item->title;
     
    363363            }
    364364       
    365             foreach ($calendar['data'] as $item) {
     365            foreach ($calendar->data as $item) {
    366366               
    367367                if (($item->doy) >= $doy) {
     
    419419                       
    420420            $results = array();
    421             foreach ($tracks['data'] as $key => $track) {
     421            foreach ($tracks->data as $key => $track) {
    422422                //check public to wordpress plugin
    423423                if($track->publish_wordpress){
     
    451451       
    452452        $workoutList = array();
    453         foreach ($workouts['data'] as $item) {
     453        foreach ($workouts->data as $item) {
    454454            $public_day = $public_setting['publish_day'];
    455455            $public_time = $public_setting['publish_time'];
     
    501501            }           
    502502
    503             foreach ($referral_sources['data'] as $item) {
     503            foreach ($referral_sources->data as $item) {
    504504                $referral[] = array('id' => $item['id'], 'name' => $item['name'], 'show_staff_list' => $item['show_staff_list']);
    505505            }
     
    696696                        'end_time' => $end
    697697            ));
    698             foreach ($calendar['data'] as $item) {
     698            foreach ($calendar->data as $item) {
    699699                if (($item->doy) >= $doy) {
    700700                    if ($item->uuid == $id) {
     
    718718            //get all products object
    719719            $plans = Pushpress_Plan::all($params);
    720             foreach ($plans['data'] as $plan) {
     720            foreach ($plans->data as $plan) {
    721721                if ($plan->slug == $id) {
    722722                    return TRUE;
  • pushpress-integration/trunk/inc/wp_pushpress_shortcode.php

    r1571482 r1576771  
    180180        if( !$client = get_transient( 'pp_client2' ) ){
    181181            echo "<br><br>Getting Client from API";
    182             $client = Pushpress_Client::retrieve('self');
     182            try {
     183                $client = Pushpress_Client::retrieve('self');
     184            }
     185            catch(Exception $e) {
     186               
     187            }
    183188            set_transient( 'pp_client2', $client, 3600 ); // 1 hour cache               
    184189        }   
  • pushpress-integration/trunk/pushpress.php

    r1571482 r1576771  
    22/**
    33 * @package WP-PushPress
    4  * @version 1.5.10
     4 * @version 1.5.11
    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.5.10
     11Version: 1.5.11
    1212Author URI: https://pushpress.com
    1313*/
    1414define('PUSHPRESS_LOCAL', FALSE);
    1515define('PUSHPRESS_DEV', FALSE);
    16 define( 'PP_PLUGIN_VERSION', '1.5.10');
     16define( 'PP_PLUGIN_VERSION', '1.5.11');
    1717define( 'PUSHPRESS_ERROR_REPORT', 0 );
    1818define( 'PUSHPRESS_BUTTON_CLASS',  'pushpress-button-class-' . rand(0, 10000));
  • pushpress-integration/trunk/readme.txt

    r1571488 r1576771  
    44Requires at least: 3.0.1
    55Tested up to: 4.6.1
    6 Stable tag: 1.5.10
     6Stable tag: 1.5.11
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    123123= 1.5.10 =
    124124Fixed issue causing some systems to hang up / freeze due to output of characters before the <!DOCTYPE>
     125
     126= 1.5.11 =
     127Found an issue affecting *some* PHP versions / hosting providers in how they were treating the data being returned from our API.  This was causing white screens of death on our pages. Fixed the issue for those affected.
  • pushpress-integration/trunk/templates/frontend/shortcode_leads.php

    r1571482 r1576771  
    135135                        foreach ($staff as $s) {
    136136                            $selected = '';
    137                             if ($s->uuid == $form['referred_by_user_id']) {
     137                            if (isset($form['referred_by_user_id']) && ($s->uuid == $form['referred_by_user_id'])) {
    138138                                $selected = 'selected';
    139139                            } 
  • pushpress-integration/trunk/templates/frontend/shortcode_workouts.php

    r1299350 r1576771  
    2121        <h2><?php echo $workout['track_name']; ?></h2>
    2222        <div class="wp-pushpress-list">
    23             <?php if (count($workout['data']) > 0): ?>
    24                 <?php foreach ($workout['data'] as $key => $item): ?>                           
     23            <?php if (count($workout->data) > 0): ?>
     24                <?php foreach ($workout->data as $key => $item): ?>                         
    2525                    <div class="item-other">
    2626                        <h3><?php echo $item['type']; ?>
Note: See TracChangeset for help on using the changeset viewer.