Plugin Directory

Changeset 3436331


Ignore:
Timestamp:
01/09/2026 10:40:17 PM (2 months ago)
Author:
rermis
Message:

v5.0.24 = * Updates to handle various meta in queue and packing slip

Location:
pb-shipping/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pb-shipping/trunk/pb_functions.php

    r3436132 r3436331  
    66Author: RLDD
    77Author URI: https://richardlerma.com/contact/
    8 Version: 5.0.23
     8Version: 5.0.24
    99Copyright: (c) 2020-2026 rldd.net - All Rights Reserved
    1010License: GPLv3 or later
     
    1414*/
    1515
    16 global $espb_version; $espb_version='5.0.23';
     16global $espb_version; $espb_version='5.0.24';
    1717if(!defined('ABSPATH')) exit;
    1818
     
    752752  $weight_unit=get_option('woocommerce_weight_unit');
    753753  $product_lookup='wp_wc_order_product_lookup';
    754   $meta_subquery="IFNULL((SELECT CONCAT('<div class=\'meta\'>',GROUP_CONCAT(DISTINCT CONCAT(UCASE(SUBSTRING(m.meta_key,1,1)),SUBSTRING(m.meta_key,2),':',m.meta_value) SEPARATOR ' | '),'</div>') FROM wp_wc_order_product_lookup pl JOIN wp_woocommerce_order_itemmeta m ON m.order_item_id=pl.order_item_id WHERE pl.order_item_id=po.order_item_id AND pl.variation_id=IFNULL(NULLIF(po.variation_id,0),po.product_id) AND m.meta_key NOT LIKE '\_%' AND m.meta_key!='Backordered' AND m.meta_value IS NOT NULL),'')";
     754  $meta_subquery="IFNULL((SELECT CONCAT('<div class=\'meta\'>',GROUP_CONCAT(DISTINCT CONCAT(UCASE(SUBSTRING(m.meta_key,1,1)),SUBSTRING(m.meta_key,2),':',m.meta_value) SEPARATOR ' | '),'</div>') FROM wp_wc_order_product_lookup pl JOIN wp_woocommerce_order_itemmeta m ON m.order_item_id=pl.order_item_id WHERE pl.order_item_id=po.order_item_id AND IFNULL(NULLIF(pl.variation_id,0),pl.product_id)=IFNULL(NULLIF(po.variation_id,0),po.product_id) AND m.meta_key NOT LIKE '\_%' AND m.meta_key!='Backordered' AND m.meta_value IS NOT NULL),'')";
    755755  if($post_type=='import_order') {
    756756    $product_lookup='wp_import_order_product_lookup';
     
    765765      ,(SELECT GROUP_CONCAT(DISTINCT REPLACE(meta_key,'_pb_label_meta_','')) FROM wp_postmeta WHERE post_id=o.ID AND meta_key LIKE '_pb_label_meta_%' AND LENGTH(meta_value)>6)label_history
    766766      ,LEFT(o.date_created_gmt,10)date_created
    767       ,REPLACE(GROUP_CONCAT(DISTINCT CONCAT('<li class=\'itm\' id=\'',p.ID,'x',po.product_qty+IFNULL(pr.product_qty,0),'\' onclick=\'toggle_item(this);\' title=\'',IFNULL(a.length,0),'x',IFNULL(a.width,0),'x',IFNULL(a.height,0),'\\n',a.weight,'$weight_unit','\'>',po.product_qty+IFNULL(pr.product_qty,0),' x ',p.post_title,a.meta) SEPARATOR ';'),';','')product_list
     767      ,REPLACE(GROUP_CONCAT(DISTINCT CONCAT('<li class=\'itm\' id=\'',p.ID,'x',po.product_qty+IFNULL(pr.product_qty,0),'\' onclick=\'toggle_item(this);\' title=\'',IFNULL(a.length,0),'x',IFNULL(a.width,0),'x',IFNULL(a.height,0),'\\n',a.weight,'$weight_unit','\'>',po.product_qty+IFNULL(pr.product_qty,0),' x ',p.post_title,a.meta) SEPARATOR '||'),'||','')product_list
    768768      ,GROUP_CONCAT(DISTINCT CONCAT(IFNULL(NULLIF(po.variation_id,0),po.product_id),'x',po.product_qty+IFNULL(pr.product_qty,0)))variation_cache
    769769      ,GROUP_CONCAT(CONCAT(po.product_id,'x',po.product_qty+IFNULL(pr.product_qty,0)))product_cache
     
    816816    ,(SELECT GROUP_CONCAT(DISTINCT REPLACE(meta_key,'_pb_label_meta_','')) FROM wp_postmeta WHERE post_id=o.ID AND meta_key LIKE '_pb_label_meta_%' AND LENGTH(meta_value)>6)label_history
    817817    ,LEFT(o.post_date,10)date_created
    818     ,REPLACE(GROUP_CONCAT(DISTINCT CONCAT('<li class=\'itm\' id=\'',p.ID,'x',po.product_qty+IFNULL(pr.product_qty,0),'\' onclick=\'toggle_item(this);\' title=\'',IFNULL(a.length,0),'x',IFNULL(a.width,0),'x',IFNULL(a.height,0),'\\n',a.weight,'$weight_unit','\'>',po.product_qty+IFNULL(pr.product_qty,0),' x ',p.post_title,a.meta,CASE WHEN p.post_parent>0 AND p.post_title NOT LIKE CONCAT('%',RIGHT(p.post_excerpt,LOCATE(':',REVERSE(p.post_excerpt))-1)) THEN IFNULL(CONCAT('<br>',p.post_excerpt),'') ELSE '' END) SEPARATOR ';'),';','')product_list
     818    ,REPLACE(GROUP_CONCAT(DISTINCT CONCAT('<li class=\'itm\' id=\'',p.ID,'x',po.product_qty+IFNULL(pr.product_qty,0),'\' onclick=\'toggle_item(this);\' title=\'',IFNULL(a.length,0),'x',IFNULL(a.width,0),'x',IFNULL(a.height,0),'\\n',a.weight,'$weight_unit','\'>',po.product_qty+IFNULL(pr.product_qty,0),' x ',p.post_title,IFNULL(a.meta,''),CASE WHEN p.post_parent>0 AND p.post_title NOT LIKE CONCAT('%',RIGHT(p.post_excerpt,LOCATE(':',REVERSE(p.post_excerpt))-1)) THEN IFNULL(CONCAT('<br>',p.post_excerpt),'') ELSE '' END) SEPARATOR '||'),'||','')product_list
    819819    ,GROUP_CONCAT(DISTINCT CONCAT(IFNULL(NULLIF(po.variation_id,0),po.product_id),'x',po.product_qty+IFNULL(pr.product_qty,0)))variation_cache
    820820    ,GROUP_CONCAT(CONCAT(po.product_id,'x',po.product_qty+IFNULL(pr.product_qty,0)))product_cache
     
    19561956
    19571957        if($dir=='inbound' && (stripos($new_status,'InTransit')!==false || stripos($new_status,'Acceptance')!==false || stripos($new_status,'Delivered')!==false)) {
    1958           if(stripos($new_status,',')!==false) {$delivery_date=substr($new_status,-10); $new_status=str_replace(", $delivery_date","",$new_status);}
    1959           if(empty($delivery_date)) $delivery_date=get_post_meta($order_id,"delivery_est_days");
     1958          $delivery_date=get_post_meta($order_id,"delivery_est_days");
    19601959          if(function_exists('espb_track_url')) $track_url=espb_track_url('',$tracking_num); else $track_url="https://parcelsapp.com/en/tracking/$tracking_num";
    19611960          $new_status=trim(preg_replace('/(?<!\ )[A-Z]/',' $0',$new_status)); // Parse into separate words
  • pb-shipping/trunk/readme.txt

    r3436132 r3436331  
    66Requires at least: 4.6
    77Tested up to: 6.9
    8 Stable tag: 5.0.23
     8Stable tag: 5.0.24
    99
    1010A streamlined US shipping solution for WooCommerce and Pitney Bowes.
     
    3737
    3838== Changelog ==
    39 = 5.0.23 = * Updates to handle null variation meta
     39= 5.0.24 = * Updates to handle various meta in queue and packing slip
    4040= 5.0.22 = * Improvements to queue and fetch tracking status
    4141= 5.0.21 = * Queue updates and aesthetic improvements
Note: See TracChangeset for help on using the changeset viewer.