Plugin Directory

Changeset 2643704


Ignore:
Timestamp:
12/14/2021 07:58:18 AM (4 years ago)
Author:
jeeblyllc
Message:

Change in error messages and increase cookie expiration time

Location:
jeebly-shipping/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • jeebly-shipping/trunk/README.txt

    r2638877 r2643704  
    55Tested up to: 5.8.1
    66Requires PHP: 7.4
    7 Stable tag: 1.0.0
     7Stable tag: 1.0.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
  • jeebly-shipping/trunk/admin/helper/helper.php

    r2638877 r2643704  
    114114            $accesstoken = $resultdata["data"]["access_token"];
    115115            $notifications["success"] = "Configuration is successful";
    116             setcookie("access_token",$accesstoken,time() + 24 * 3600 * 7);
     116            setcookie("access_token", $accesstoken,time() + 24 * 3600 * 30);
    117117        }
    118118        if (array_key_exists('customer', $resultdata['data']) &&
     
    121121            $customerId = $resultdata["data"]['customer']['id'];
    122122            $customerCode = $resultdata["data"]['customer']['code'];
    123             setcookie("cust_id",$customerId);
    124             setcookie("cust_code",$customerCode);
     123            setcookie("cust_id", $customerId, time() + 24 * 3600 * 30);
     124            setcookie("cust_code", $customerCode, time() + 24 * 3600 * 30);
    125125        }
    126126    }
     
    441441        $result = wp_remote_retrieve_body( $response );
    442442        $array = json_decode($result, true);
     443        var_dump($array);
    443444        $data = array();
    444445        $data['orderId'] = $postRequestParams['customer-reference-number'];
    445446        $notifications = array();
    446447        $notifications['post_type'] = "shop_order";
    447         if (array_key_exists('data', $array) && array_key_exists('reference_number', $array['data'][0])) {
     448        if (array_key_exists('data', $array) && array_key_exists('reference_number', $array['data'][0]) && !empty($array['data'][0]['reference_number'])) {
    448449            $data['shipsy_refno'] = $array['data'][0]["reference_number"];
    449450            dtdcAddSynctrack($data);
  • jeebly-shipping/trunk/admin/partials/ec-manage.php

    r2638877 r2643704  
    6565        <div class="alert alert-danger" role="alert">No AWB Numbers found</div>
    6666<?php
     67    } else if (array_key_exists('error', $response) && $response[error][statusCode] == 401) { ?>
     68        <div class="alert alert-danger" role="alert"><?php _e($response['error']['reason'] .': ' . 'Please login in Shipsy Configuration!') ?></div>
     69<?php
    6770    } else if (array_key_exists('error', $response)) { ?>
    6871        <div class="alert alert-danger" role="alert"><?php _e( $response['error']['message'])?></div>
  • jeebly-shipping/trunk/admin/partials/ec-setup.php

    r2638877 r2643704  
    8080                </div>
    8181                <div class = "col-sm-3">
    82                     <label for="forward-pincode" class = "label-font">Pincode <span class = "required-text">*</span></label>
    83                     <input type="number" id="forward-pincode" oninput="this.value=this.value.slice(0,this.maxLength)" maxlength="6" name="forward-pincode"style= "border-radius:0px"  class="form-control  " value="<?php _e( $forwardAddress['pincode'] ?? '') ?>">
     82                    <label for="forward-pincode" class = "label-font">Pincode</label>
     83                    <input type="number" id="forward-pincode" name="forward-pincode"style= "border-radius:0px"  class="form-control  " value="<?php _e( $forwardAddress['pincode'] ?? '') ?>">
    8484                </div>
    8585                <div class = "col-sm-2"></div>
     
    146146                </div>
    147147                <div class = "col-sm-3">
    148                     <label for="reverse-pincode" class = "label-font"> Pincode <span class = "required-text">*</span></label>
    149                      <input type="number" id="reverse-pincode" name="reverse-pincode"  oninput="this.value=this.value.slice(0,this.maxLength)" maxlength="6" style = "border-radius:0px" class="form-control  " value="<?php _e( $reverseAddress['pincode'] ?? '') ?>">
     148                    <label for="reverse-pincode" class = "label-font"> Pincode</label>
     149                     <input type="number" id="reverse-pincode" name="reverse-pincode" style = "border-radius:0px" class="form-control  " value="<?php _e( $reverseAddress['pincode'] ?? '') ?>">
    150150                </div>
    151151                <div class = "col-sm-2"></div>
     
    272272                    </div>
    273273                <div class = "col-sm-3">
    274                     <label for="exp-return-pincode" class = "label-font">Pincode <span class = "required-text">*</span></label>
    275                     <input type="number" id="exp-return-pincode" name="exp-return-pincode" oninput="this.value=this.value.slice(0,this.maxLength)" maxlength="6" style = "border-radius:0px" class="form-control  " value="<?php _e( $exceptionalReturnAddress['pincode'] ?? '' )?>">
     274                    <label for="exp-return-pincode" class = "label-font">Pincode</label>
     275                    <input type="number" id="exp-return-pincode" name="exp-return-pincode" style = "border-radius:0px" class="form-control  " value="<?php _e( $exceptionalReturnAddress['pincode'] ?? '' )?>">
    276276                </div>
    277277                <div class = "col-sm-2"></div>
     
    302302
    303303
    304  
     304<?php
     305    } else if (array_key_exists('error', $response) && $response[error][statusCode] == 401) { ?>
     306        <div class="alert alert-danger" role="alert"><?php _e( $response['error']['reason'] .': ' . 'Please login in Shipsy Configuration!')?></div>
    305307<?php
    306308    } else if (array_key_exists('error', $response)) { ?>
  • jeebly-shipping/trunk/admin/partials/ec-sync-form.php

    r2638877 r2643704  
    150150                                    <div class="col-sm-3">
    151151                                        <label for="origin-pincode">Pincode</label>
    152                                         <input type="text" id="origin-pincode" oninput="this.value=this.value.slice(0,this.maxLength)" maxlength="6" style="border-radius : 0px" name="origin-pincode" class="form-control    " value="<?php _e($forwardAddress['pincode']) ?>">
     152                                        <input type="text" id="origin-pincode" style="border-radius : 0px" name="origin-pincode" class="form-control    " value="<?php _e($forwardAddress['pincode']) ?>">
    153153                                    </div>
    154154                                </div>
     
    209209                                    <div class="col-sm-3">
    210210                                        <label for="destination-pincode" class="label-font">Pincode</label>
    211                                         <input type="number" id="destination-pincode" oninput="this.value=this.value.slice(0,this.maxLength)" maxlength="6" name="destination-pincode" style="border-radius : 0px" class="form-control   " value="<?php _e($shippingAddress['postcode']) ?>">
     211                                        <input type="text" id="destination-pincode" name="destination-pincode" style="border-radius : 0px" class="form-control   " value="<?php _e($shippingAddress['postcode']) ?>">
    212212                                    </div>
    213213                                </div>
     
    292292                        </div>
    293293
     294                    <?php } else if (array_key_exists('error', $response) && $response[error][statusCode] == 401) { ?>
     295                        <div class="alert alert-danger" role="alert"><?php _e($response['error']['reason'] .': ' . 'Please login in Shipsy Configuration!') ?></div>
     296                   
    294297                    <?php } else if (array_key_exists('error', $response)) { ?>
    295298                        <div class="alert alert-danger" role="alert"><?php _e($response['error']['message']) ?></div>
  • jeebly-shipping/trunk/admin/partials/ec-vseries.php

    r2638877 r2643704  
    4242        <div class="alert alert-warning" role="alert">No virtual series alloted</div>
    4343<?php
     44    } else if (array_key_exists('error', $response) && $response[error][statusCode] == 401) { ?>
     45        <div class="alert alert-danger" role="alert"><?php _e($response['error']['reason'] .': ' . 'Please login in Shipsy Configuration!') ?></div>
     46<?php
    4447    } else if (array_key_exists('error', $response)) { ?>
    4548        <div class="alert alert-danger" role="alert"><?php _e($response['error']['message'])?></div>
  • jeebly-shipping/trunk/dtdc-econnect.php

    r2638877 r2643704  
    1717 * Plugin URI:       
    1818 * Description:       Jeebly connects your store to help you with, syncing orders to Jeebly application, print AWB labels and track your packages.
    19  * Version:           1.0.0
     19 * Version:           1.0.1
    2020 * Author:            shipsyplugins
    2121 * Author URI:        https://shipsy.io/
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define( 'JEEBLY_SHIPPING_VERSION', '1.0.0' );
     38define( 'JEEBLY_SHIPPING_VERSION', '1.0.1' );
    3939define( 'JEEBLY_SHIPPING_URL', plugin_dir_url( __FILE__ ) );
    4040define( 'JEEBLY_SHIPPING_PATH', plugin_dir_path( __FILE__ ) );
Note: See TracChangeset for help on using the changeset viewer.