Plugin Directory

Changeset 2819261


Ignore:
Timestamp:
11/16/2022 06:18:18 PM (3 years ago)
Author:
shiptimizeplugins
Message:

3.1.62 issue in re-exporting an order that was deleted in the app after it was exported

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

Legend:

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

    r2817728 r2819261  
    44define( 'SHIPTIMIZE_API_URL', 'https://api.pakketmail.nl/v3' );
    55define( 'SHIPTIMIZE_BRAND', 'Shiptimize' );
    6 define( 'SHIPTIMIZE_VERSION', '3.1.61' );
     6define( 'SHIPTIMIZE_VERSION', '3.1.62' );
    77define( 'SHIPTIMIZE_CREATE_ACCOUNT', 'https://www.shiptimize.me/quote/' );
    88define( 'SHIPTIMIZE_CHECKOUT', 0);
  • shiptimize-for-woocommerce/trunk/includes/class-woo-shiptimize-order.php

    r2808620 r2819261  
    734734              WooShiptimize::log("Order $shipment->ShopItemId ");
    735735              $order->set_status(ShiptimizeOrder::$STATUS_NOT_EXPORTED);
    736 
    737               self::export(array($shipment->ShopItemId));
    738               $labelsummary = self::print_label(array($shipment->ShopItemId));
    739               foreach ($labelsummary->errors as $err) {
    740                 array_push( $summary->errors, $err ); 
    741               }             
    742 
    743               $actualerror = empty($labelsummary->errors) ? 0 : 1;
     736              $order->append_errors( array(
     737                (object) array("Tekst" => "Shipment was deleted in the app. Export again") 
     738              ));
    744739            }
    745740            else if($error->Id == 297 || $error->Id == 200) { // Shipment already pre-alerted
     
    765760        } else {
    766761          ++$summary->n_success;
    767 
    768           if (isset($shipment->WarningList)) {
    769             $order->append_errors($shipment->WarningList);
    770           }
    771 
    772762          $order->set_status( ShiptimizeOrder::$STATUS_EXPORTED_SUCCESSFULLY );         
    773763        }
     
    781771            array_push( $summary->errors, array(
    782772              'Id' => $warning->Id,
    783               'Tekst' => $warning->Tekst,
     773              'Tekst' => 'Warn ' . $warning->Tekst,
    784774              'ShopItemId' => $shipment->ShopItemId
    785775            ) ); 
     
    891881        $shiptimize = WooShiptimize::instance();
    892882        $summary->message .= '' . $shiptimize->translate('setcredentials');
    893       }
     883      } 
    894884      else {
    895885        $patchsummary = self::shipments_response($response);
  • shiptimize-for-woocommerce/trunk/includes/class-woo-shiptimize.php

    r2805627 r2819261  
    191191    self::callback_url();
    192192
    193     //plugin is not run when we get here..
     193    // Plugin is not run when we get here..
    194194    $shiptimize = WooShiptimize::instance();
    195195    $shiptimize->create_shiptimize_data_model('bigint(20) unsigned ');
  • shiptimize-for-woocommerce/trunk/includes/core/class-shiptimize-order.php

    r2746465 r2819261  
    824824        }
    825825
    826         if($this->Transporter){
     826        if($this->Transporter && is_numeric($this->Transporter)){
    827827            $data['Carrier'] = array(
    828828                "Id"=> $this->Transporter,
  • shiptimize-for-woocommerce/trunk/readme.txt

    r2817728 r2819261  
    5959== Changelog ==
    6060
     61= 3.1.62 - 2022-11-16 =
     62* Fix - Issue with re-exporting a shipment that was exported and then deleted in the app.
     63
    6164= 3.1.61 - 2022-11-01 =
    6265* Fix - compatibility with "advanced trable rates" restaured. 
  • shiptimize-for-woocommerce/trunk/shiptimize.php

    r2817728 r2819261  
    33 * Plugin Name: Shiptimize for WooCommerce
    44 * Description: Shiptimize for WooCommerce 
    5  * Version: 3.1.61
     5 * Version: 3.1.62
    66 * Author: Shiptimize
    77 * Author URI: https://shiptimize.me
Note: See TracChangeset for help on using the changeset viewer.