Plugin Directory

Changeset 3269023


Ignore:
Timestamp:
04/08/2025 03:31:36 PM (12 months ago)
Author:
jrmoser
Message:

version 2.1.5

Location:
box-tracker
Files:
4 edited
7 copied

Legend:

Unmodified
Added
Removed
  • box-tracker/tags/2.1.5/box-tracker-online.php

    r3268046 r3269023  
    88Plugin URI: https://www.dumpster.software/api/word-press-plugin.html
    99Description: The Box Tracker plugin facilitates online ordering for waste haulers.  Depending on configuration, orders will result either in service requests on the customer screen or fully booked work orders on dispatch.  Using the Web API tab on Box Tracker's Preferences app, you can prevent over booking, control which days of the week online orders will be accepted, and prevent same day ordering.  For more information about Box Tracker or this plugin please contact support at 603 546 6751 option 2 or support@cairnapps.com
    10 Version: 2.1.4
     10Version: 2.1.5
    1111Author: Cairn Applications Inc
    1212Author URI: https://www.cloud-computing.rocks/
  • box-tracker/tags/2.1.5/includes/base/ajax-control.php

    r3268046 r3269023  
    560560        $b0xT_ss_map_center_lng = is_numeric($b0xT_ss_map_center_lng) && $b0xT_ss_map_center_lng >= -180 && $b0xT_ss_map_center_lng <= 180 ? $b0xT_ss_map_center_lng : "0";
    561561
    562         $b0xT_distance_api = sanitize_text_field(get_option('b0xT_distance_api'));
    563 
    564         $b0xT_driving_distance_query;
    565 
    566         if($b0xT_distance_api == 'Matrix API') {
    567             $b0xT_driving_distance_query = $this->b0xT_server_calls->b0xT_get_driving_distance($b0xT_lat, $b0xT_long, $b0xT_ss_map_center_lat, $b0xT_ss_map_center_lng); //b0xT_get_driving_distance() sanitizes values
    568         } elseif($b0xT_distance_api == 'Routes API') {
    569             $b0xT_driving_distance_query = $this->b0xT_server_calls->b0xT_get_driving_distance_routes_api($b0xT_lat, $b0xT_long, $b0xT_ss_map_center_lat, $b0xT_ss_map_center_lng); //b0xT_get_driving_distance_routes_api() sanitizes values
    570         } else { #should only trigger once
    571             $b0xT_driving_distance_query = $this->b0xT_server_calls->b0xT_get_driving_distance($b0xT_lat, $b0xT_long, $b0xT_ss_map_center_lat, $b0xT_ss_map_center_lng); //b0xT_get_driving_distance() sanitizes values
    572 
    573             if($b0xT_driving_distance_query['b0xT_error_message']) {
    574                 $b0xT_driving_distance_query = $this->b0xT_server_calls->b0xT_get_driving_distance_routes_api($b0xT_lat, $b0xT_long, $b0xT_ss_map_center_lat, $b0xT_ss_map_center_lng); //b0xT_get_driving_distance_routes_api() sanitizes values
    575 
    576                 if($b0xT_driving_distance_query['b0xT_error_message']) {} else {
    577                     delete_option('b0xT_distance_api'); #remove
     562        $b0xT_matrix_api_check = function() use($b0xT_lat, $b0xT_long, $b0xT_ss_map_center_lat, $b0xT_ss_map_center_lng) {
     563            $b0xT_response_query = $this->b0xT_server_calls->b0xT_get_driving_distance($b0xT_lat, $b0xT_long, $b0xT_ss_map_center_lat, $b0xT_ss_map_center_lng); //b0xT_get_driving_distance() sanitizes values
     564            delete_option('b0xT_distance_api'); #remove
     565            if(!$b0xT_response_query['b0xT_error_message']) {
     566                add_option('b0xT_distance_api', 'Matrix API');
     567            }
     568            return $b0xT_response_query;
     569        };
     570
     571        $b0xT_routes_api_check = function() use($b0xT_lat, $b0xT_long, $b0xT_ss_map_center_lat, $b0xT_ss_map_center_lng) {
     572            $b0xT_response_query = $this->b0xT_server_calls->b0xT_get_driving_distance_routes_api($b0xT_lat, $b0xT_long, $b0xT_ss_map_center_lat, $b0xT_ss_map_center_lng); //b0xT_get_driving_distance_routes_api() sanitizes values     
     573            if(!(sanitize_text_field(get_option('b0xT_distance_api')) == 'Routes API')) {
     574                delete_option('b0xT_distance_api'); #remove
     575                if(!$b0xT_response_query['b0xT_error_message']) {
    578576                    add_option('b0xT_distance_api', 'Routes API');
    579577                }
    580             } else {
    581                 delete_option('b0xT_distance_api'); #remove
    582                 add_option('b0xT_distance_api', 'Matrix API');
    583             }
    584         }
     578            }
     579            return $b0xT_response_query;
     580        };
     581
     582        $b0xT_both_api_check = function() use($b0xT_matrix_api_check, $b0xT_routes_api_check) {
     583            $b0xT_response_query = $b0xT_matrix_api_check();
     584            if($b0xT_response_query['b0xT_error_message']) {
     585                $b0xT_response_query = $b0xT_routes_api_check();
     586            }
     587            return $b0xT_response_query;   
     588        };
     589
     590        $b0xT_get_distance_query = function() use($b0xT_both_api_check, $b0xT_routes_api_check) {
     591            if(!get_option('b0xT_distance_api') || sanitize_text_field(get_option('b0xT_distance_api')) == 'Matrix API') {
     592                $b0xT_response_query = $b0xT_both_api_check();
     593            } elseif(sanitize_text_field(get_option('b0xT_distance_api')) == 'Routes API') {
     594                $b0xT_response_query = $b0xT_routes_api_check();
     595            }
     596            return $b0xT_response_query;
     597        };
     598   
     599        $b0xT_driving_distance_query = $b0xT_get_distance_query();
     600
     601        wp_send_json($b0xT_driving_distance_query);
    585602
    586603        if($b0xT_driving_distance_query['b0xT_error_message']) {
  • box-tracker/tags/2.1.5/includes/base/server-calls.php

    r3268046 r3269023  
    169169        }
    170170
    171         return array('b0xT_distance' => $b0xT_dist, 'b0xT_time' => $b0xT_time, 'b0xT_response' => $b0xT_response);
     171        return array('b0xT_distance' => $b0xT_dist, 'b0xT_time' => $b0xT_time, 'b0xT_response' => $b0xT_response, 'b0xT_API' => 'Matrix API');
    172172    }
    173173
     
    248248        }
    249249
    250         return array('b0xT_distance' => $b0xT_dist, 'b0xT_time' => $b0xT_time, 'b0xT_response' => $b0xT_response);
     250        return array('b0xT_distance' => $b0xT_dist, 'b0xT_time' => $b0xT_time, 'b0xT_response' => $b0xT_response, 'b0xT_API' => 'Routes API');
    251251    }
    252252
  • box-tracker/tags/2.1.5/readme.txt

    r3268046 r3269023  
    44Requires PHP: 5.6.4
    55Tested up to: 6.7.2
    6 Stable tag: 2.1.4
     6Stable tag: 2.1.5
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • box-tracker/trunk/box-tracker-online.php

    r3268046 r3269023  
    88Plugin URI: https://www.dumpster.software/api/word-press-plugin.html
    99Description: The Box Tracker plugin facilitates online ordering for waste haulers.  Depending on configuration, orders will result either in service requests on the customer screen or fully booked work orders on dispatch.  Using the Web API tab on Box Tracker's Preferences app, you can prevent over booking, control which days of the week online orders will be accepted, and prevent same day ordering.  For more information about Box Tracker or this plugin please contact support at 603 546 6751 option 2 or support@cairnapps.com
    10 Version: 2.1.4
     10Version: 2.1.5
    1111Author: Cairn Applications Inc
    1212Author URI: https://www.cloud-computing.rocks/
  • box-tracker/trunk/includes/base/ajax-control.php

    r3268046 r3269023  
    560560        $b0xT_ss_map_center_lng = is_numeric($b0xT_ss_map_center_lng) && $b0xT_ss_map_center_lng >= -180 && $b0xT_ss_map_center_lng <= 180 ? $b0xT_ss_map_center_lng : "0";
    561561
    562         $b0xT_distance_api = sanitize_text_field(get_option('b0xT_distance_api'));
    563 
    564         $b0xT_driving_distance_query;
    565 
    566         if($b0xT_distance_api == 'Matrix API') {
    567             $b0xT_driving_distance_query = $this->b0xT_server_calls->b0xT_get_driving_distance($b0xT_lat, $b0xT_long, $b0xT_ss_map_center_lat, $b0xT_ss_map_center_lng); //b0xT_get_driving_distance() sanitizes values
    568         } elseif($b0xT_distance_api == 'Routes API') {
    569             $b0xT_driving_distance_query = $this->b0xT_server_calls->b0xT_get_driving_distance_routes_api($b0xT_lat, $b0xT_long, $b0xT_ss_map_center_lat, $b0xT_ss_map_center_lng); //b0xT_get_driving_distance_routes_api() sanitizes values
    570         } else { #should only trigger once
    571             $b0xT_driving_distance_query = $this->b0xT_server_calls->b0xT_get_driving_distance($b0xT_lat, $b0xT_long, $b0xT_ss_map_center_lat, $b0xT_ss_map_center_lng); //b0xT_get_driving_distance() sanitizes values
    572 
    573             if($b0xT_driving_distance_query['b0xT_error_message']) {
    574                 $b0xT_driving_distance_query = $this->b0xT_server_calls->b0xT_get_driving_distance_routes_api($b0xT_lat, $b0xT_long, $b0xT_ss_map_center_lat, $b0xT_ss_map_center_lng); //b0xT_get_driving_distance_routes_api() sanitizes values
    575 
    576                 if($b0xT_driving_distance_query['b0xT_error_message']) {} else {
    577                     delete_option('b0xT_distance_api'); #remove
     562        $b0xT_matrix_api_check = function() use($b0xT_lat, $b0xT_long, $b0xT_ss_map_center_lat, $b0xT_ss_map_center_lng) {
     563            $b0xT_response_query = $this->b0xT_server_calls->b0xT_get_driving_distance($b0xT_lat, $b0xT_long, $b0xT_ss_map_center_lat, $b0xT_ss_map_center_lng); //b0xT_get_driving_distance() sanitizes values
     564            delete_option('b0xT_distance_api'); #remove
     565            if(!$b0xT_response_query['b0xT_error_message']) {
     566                add_option('b0xT_distance_api', 'Matrix API');
     567            }
     568            return $b0xT_response_query;
     569        };
     570
     571        $b0xT_routes_api_check = function() use($b0xT_lat, $b0xT_long, $b0xT_ss_map_center_lat, $b0xT_ss_map_center_lng) {
     572            $b0xT_response_query = $this->b0xT_server_calls->b0xT_get_driving_distance_routes_api($b0xT_lat, $b0xT_long, $b0xT_ss_map_center_lat, $b0xT_ss_map_center_lng); //b0xT_get_driving_distance_routes_api() sanitizes values     
     573            if(!(sanitize_text_field(get_option('b0xT_distance_api')) == 'Routes API')) {
     574                delete_option('b0xT_distance_api'); #remove
     575                if(!$b0xT_response_query['b0xT_error_message']) {
    578576                    add_option('b0xT_distance_api', 'Routes API');
    579577                }
    580             } else {
    581                 delete_option('b0xT_distance_api'); #remove
    582                 add_option('b0xT_distance_api', 'Matrix API');
    583             }
    584         }
     578            }
     579            return $b0xT_response_query;
     580        };
     581
     582        $b0xT_both_api_check = function() use($b0xT_matrix_api_check, $b0xT_routes_api_check) {
     583            $b0xT_response_query = $b0xT_matrix_api_check();
     584            if($b0xT_response_query['b0xT_error_message']) {
     585                $b0xT_response_query = $b0xT_routes_api_check();
     586            }
     587            return $b0xT_response_query;   
     588        };
     589
     590        $b0xT_get_distance_query = function() use($b0xT_both_api_check, $b0xT_routes_api_check) {
     591            if(!get_option('b0xT_distance_api') || sanitize_text_field(get_option('b0xT_distance_api')) == 'Matrix API') {
     592                $b0xT_response_query = $b0xT_both_api_check();
     593            } elseif(sanitize_text_field(get_option('b0xT_distance_api')) == 'Routes API') {
     594                $b0xT_response_query = $b0xT_routes_api_check();
     595            }
     596            return $b0xT_response_query;
     597        };
     598   
     599        $b0xT_driving_distance_query = $b0xT_get_distance_query();
     600
     601        wp_send_json($b0xT_driving_distance_query);
    585602
    586603        if($b0xT_driving_distance_query['b0xT_error_message']) {
  • box-tracker/trunk/includes/base/server-calls.php

    r3268046 r3269023  
    169169        }
    170170
    171         return array('b0xT_distance' => $b0xT_dist, 'b0xT_time' => $b0xT_time, 'b0xT_response' => $b0xT_response);
     171        return array('b0xT_distance' => $b0xT_dist, 'b0xT_time' => $b0xT_time, 'b0xT_response' => $b0xT_response, 'b0xT_API' => 'Matrix API');
    172172    }
    173173
     
    248248        }
    249249
    250         return array('b0xT_distance' => $b0xT_dist, 'b0xT_time' => $b0xT_time, 'b0xT_response' => $b0xT_response);
     250        return array('b0xT_distance' => $b0xT_dist, 'b0xT_time' => $b0xT_time, 'b0xT_response' => $b0xT_response, 'b0xT_API' => 'Routes API');
    251251    }
    252252
  • box-tracker/trunk/readme.txt

    r3268046 r3269023  
    44Requires PHP: 5.6.4
    55Tested up to: 6.7.2
    6 Stable tag: 2.1.4
     6Stable tag: 2.1.5
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.