Plugin Directory

Changeset 2772699


Ignore:
Timestamp:
08/19/2022 05:32:55 PM (4 years ago)
Author:
shiptimizeplugins
Message:

update the trackingid when receiving the label response, so if there are issues with shop update at least the tracking is there

Location:
shiptimize-for-woocommerce/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • shiptimize-for-woocommerce/trunk/constants.php

    r2760287 r2772699  
    44define( 'SHIPTIMIZE_API_URL', 'https://api.pakketmail.nl/v3' );
    55define( 'SHIPTIMIZE_BRAND', 'Shiptimize' );
    6 define( 'SHIPTIMIZE_VERSION', '3.1.49' );
     6define( 'SHIPTIMIZE_VERSION', '3.1.50' );
    77define( 'SHIPTIMIZE_CREATE_ACCOUNT', 'https://www.shiptimize.me/quote/' );
    88define( 'SHIPTIMIZE_CHECKOUT', 0);
  • shiptimize-for-woocommerce/trunk/includes/admin/class-shiptimize-order-ui.php

    r2746465 r2772699  
    7979            $labelurl = $response->response->LabelFile; // all labels in this batch share the same url 
    8080            $msg = $shiptimize->translate('labelprinted');
     81            $order->set_tracking_id($labelresult->TrackingId, $labelurl);
    8182          }
    8283          else {
  • shiptimize-for-woocommerce/trunk/includes/class-woo-shiptimize-order.php

    r2760287 r2772699  
    478478    global $wpdb, $shiptimize;
    479479
     480    if ($tracking_id == get_post_meta($this->ShopItemId, 'shiptimize_trackingid', true)) {
     481      WooShiptimize::log("Order already has trackingid $tracking_id ignoring");
     482      return;
     483    }
     484
    480485    $this->add_message($this->get_formated_message($shiptimize->translate("api sent trackingId:").' '.$tracking_id));
    481486
  • shiptimize-for-woocommerce/trunk/includes/class-woo-shiptimize.php

    r2757277 r2772699  
    816816    $contentvalid = true;
    817817
    818     try {
    819       $content = file_get_contents($checkapiurl);
     818    try { 
     819      $content = file_get_contents($checkapiurl); 
    820820      $json = json_decode($content);
    821       $contentvalid = isset($json->home);
     821      $contentvalid = isset($json->name);
    822822    }
    823823    catch (Exception $e) {
    824824      $contentvalid = false;
    825       self::log($e->getMessage());
     825      self::log("Exception ocurred trying to get the api url " . $e->getMessage());
    826826    }
    827827 
    828828    restore_error_handler();
     829    self::log("==== is_api_active " . ($contentvalid ? 'Yes' : 'No'));
    829830    return $contentvalid;
    830831  }
  • shiptimize-for-woocommerce/trunk/readme.txt

    r2760287 r2772699  
    8585= 3.1.41 - 20212-04-13 =
    8686* enhancement - allow users to declare Free shipping With one of our carriers
    87  
    8887
    8988= 3.1.40 - 20212-03-28 = 
  • shiptimize-for-woocommerce/trunk/shiptimize.php

    r2760287 r2772699  
    33 * Plugin Name: Shiptimize for WooCommerce
    44 * Description: Shiptimize for WooCommerce 
    5  * Version: 3.1.49
     5 * Version: 3.1.50
    66 * Author: Shiptimize
    77 * Author URI: https://shiptimize.me
     
    1515 *
    1616 */
    17 
    1817if ( ! defined( 'ABSPATH' ) ) {
    1918  exit; // Exit if accessed directly.
     
    3433define( 'SHIPTIMIZE_LOGO', SHIPTIMIZE_PLUGIN_URL . 'assets/images/logo.svg' );
    3534
    36 
    3735require_once(SHIPTIMIZE_PLUGIN_PATH . '/constants.php');
    3836require_once(SHIPTIMIZE_PLUGIN_PATH . 'includes/class-woo-shiptimize.php');   
Note: See TracChangeset for help on using the changeset viewer.