Plugin Directory

Changeset 3427532


Ignore:
Timestamp:
12/26/2025 04:54:21 AM (8 weeks ago)
Author:
rermis
Message:

v2.1.8 = * Minor bug fixes to variation level estimates.

Location:
wc-ship-est/tags/2.1.8
Files:
3 copied

Legend:

Unmodified
Added
Removed
  • wc-ship-est/tags/2.1.8/readme.txt

    r3424879 r3427532  
    66Requires at least: 6.6
    77Tested up to: 6.9
    8 Stable tag: 2.1.7
     8Stable tag: 2.1.8
    99
    1010Add a Delivery Estimate or Shipping Method Description to the WooCommerce Cart with a simple, fast and lightweight plugin.
     
    4646
    4747== Changelog ==
     48= 2.1.8 = * Minor bug fixes to variation level estimates.
    4849= 2.1.7 = * Fix to unsupported email types.
    4950= 2.1.6 = * Fix to null params in wse_add_email_ship_var
  • wc-ship-est/tags/2.1.8/wse_functions.php

    r3424879 r3427532  
    1313License URI: http://www.gnu.org/licenses/gpl-3.0.html
    1414WC requires at least: 9.0
    15 WC tested up to: 10.3
     15WC tested up to: 10.4
    1616*/
    1717
    18 global $wp_version,$wse_version,$wse_pro_version,$wse_version_type; $wse_version='2.1.7';
     18global $wp_version,$wse_version,$wse_pro_version,$wse_version_type; $wse_version='2.1.8';
    1919$wse_version_type='GPL';
    2020$wse_pro_version=get_option('wse_pro_version');
     
    11861186
    11871187    if($has_vars) {
    1188       $vc_base=array();
    1189       $vc_bk=array();
     1188      $vc_days=array();
    11901189      foreach($vars as $vid) {
    11911190        $i=0;
     
    11931192          if($prds[$i]==$vid) {
    11941193            $d=intval($prd_days[$i]??0);
    1195             if($d>0) {
    1196               $vc_base[]=$d;
     1194            if(wse_backordered($prd_id,$vid,1)>0) {
    11971195              $bk=intval($prd_bk_days[$i]??0);
    1198               if($bk>0) $vc_bk[]=$bk;
     1196              if($bk>0) $d+=$bk;
    11991197            }
     1198            if($d>0) $vc_days[]=$d;
    12001199          }
    12011200          $i++;
    12021201        }
    12031202      }
    1204       if(!empty($vc_base)) {
    1205         if($type=='min') {
    1206           $ship_days[]=min($vc_base);
    1207         } else {
    1208           $max_base=max($vc_base);
    1209           $max_bk=!empty($vc_bk)?max($vc_bk):0;
    1210           $ship_days[]=$max_base+$max_bk;
     1203      if(!empty($vc_days)) {
     1204        if($type=='min') $ship_days[]=min($vc_days);
     1205        else $ship_days[]=max($vc_days);
     1206      } else {
     1207        $i=0;
     1208        if($p_ct>0) {
     1209          while($i<$p_ct) {
     1210            if($prds[$i]>0) {
     1211              if($prd_id==$prds[$i]) {
     1212                if(empty($prd_days[$i])) $prd_days[$i]=0;
     1213                if(wse_backordered($prd_id,$prd_id,1)>0) if($prd_bk_days[$i]>0) {$prd_days[$i]+=$prd_bk_days[$i]; $apply_ct++;}
     1214                if($prd_days[$i]>0) array_push($ship_days,$prd_days[$i]);
     1215              }
     1216            }
     1217            $i++;
     1218          }
     1219        }
     1220        if($apply_ct<1 && wse_backordered($prd_id,$prd_id,1)>0) {
     1221          if(!empty($def_bk_days)) array_push($ship_days,$def_bk_days);
     1222          elseif(!empty($def_bk_desc)) $bko_prd++;
    12111223        }
    12121224      }
Note: See TracChangeset for help on using the changeset viewer.