Plugin Directory

Changeset 3157196


Ignore:
Timestamp:
09/25/2024 02:22:50 AM (18 months ago)
Author:
jtexpress
Message:

push order + print consignment note

Location:
jt-express/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • jt-express/trunk/admin/class-jnt-admin.php

    r3145050 r3157196  
    2626        $plugins = get_plugins();
    2727        $current_version = $plugins[$plugin_slug]['Version'];
    28         $latest_version = '2.0.12';
     28        $latest_version = '2.0.13';
    2929
    3030        if (version_compare($current_version, $latest_version, '<')) {
  • jt-express/trunk/admin/class-jnt-cancel-order.php

    r3059538 r3157196  
    5555
    5656                $detail = json_decode($details['detail'], true);
    57                 foreach ($detail as $d) {
    58                     $awb_no = $d[0]['awb_no'];
    59                     $status = $d[0]['status'];
    60                     $reason = $d[0]['reason'];
    61                 }
     57
     58                $awb_no = $detail['details'][0]['awb_no'];
     59                $status = $detail['details'][0]['status'];
     60                $reason = $detail['details'][0]['reason'];
     61
    6262
    6363                if ($status == 'success') {
     
    7474            $redirect_to = add_query_arg(array(
    7575                'acti' => 'cancel',
    76                 'status' => $status,
     76                'msg' => $status,
    7777                'reasons' => $reasons,
    7878            ), $redirect_to);
  • jt-express/trunk/admin/class-jnt-order.php

    r3145050 r3157196  
    6161        $stt = array();
    6262        $result = array();
     63        $print_ids = array();
    6364
    6465        foreach ($post_ids as $post_id) {
     
    100101
    101102                if ($awb) {
     103                    $print_ids[] = $id;
    102104                    $order = wc_get_order($id);
    103105                    $order->add_order_note("Tracking number: " . $awb);
     
    112114                array_push($stt, $status);
    113115            }
     116
     117            $this->jnt_helper->process_print_thermal($print_ids);
    114118
    115119            $redirect_to = add_query_arg(array(
     
    291295            echo "<div id='message' class='updated fade'>";
    292296            echo "<p>";
    293             echo $_REQUEST['status'];
     297            echo $_REQUEST['msg'];
    294298            echo "</p>";
    295299            echo "</div>";
  • jt-express/trunk/includes/class-jnt-api.php

    r3145050 r3157196  
    137137        header('Content-Disposition: attachment; filename="' . substr($awbs, 0, 100) . '.pdf"');
    138138        header('Content-Length: ' . strlen($pdf_content));
    139 
     139        ob_clean();
     140        flush();
    140141        echo $pdf_content;
    141142        exit;
  • jt-express/trunk/includes/class-jnt-helper.php

    r3145050 r3157196  
    8787            $cod = 0;
    8888            $subtotal = $order->get_subtotal();
     89            $total = $order->get_total();
    8990            if ('cod' == $order->get_payment_method()) {
    90                 $cod = $subtotal;
     91                $cod = $total;
    9192            }
    9293
  • jt-express/trunk/jnt.php

    r3145050 r3157196  
    55Description: WooCommerce integration for J&T Express Malaysia.
    66Author: woocs
    7 Version: 2.0.12
     7Version: 2.0.13
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
     
    1414}
    1515
    16 define('JNT_VERSION', '2.0.12');
     16define('JNT_VERSION', '2.0.13');
    1717define('JNT_PLUGIN_DIR', plugin_dir_path(__FILE__));
    1818
Note: See TracChangeset for help on using the changeset viewer.