Plugin Directory

Changeset 3407061


Ignore:
Timestamp:
12/01/2025 04:55:46 PM (6 weeks ago)
Author:
aarsiv
Message:

Improvemnt

Location:
a2z-fedex-shipping
Files:
64 added
2 edited

Legend:

Unmodified
Added
Removed
  • a2z-fedex-shipping/trunk/a2zfedex_basic.php

    r3405383 r3407061  
    44 * Plugin URI: https://myshipi.com/
    55 * Description: Realtime Shipping Rates, shipping labels.
    6  * Version: 5.1.4
     6 * Version: 5.1.5
    77 * Author: Shipi
    88 * Author URI: https://myshipi.com/
     
    31373137            foreach ( $items as $item ) {
    31383138                $product_data = $item->get_data();
     3139
     3140                $refunded_qty = $order->get_qty_refunded_for_item( $item->get_id() );
     3141                $remaining_qty = $product_data['quantity'] + $refunded_qty;
     3142
     3143                if ($remaining_qty <= 0) {
     3144                    continue;
     3145                }
    31393146                               
    31403147                $product = array();
    3141                 $product['product_quantity'] = $product_data['quantity'];
     3148                $product['product_quantity'] = $remaining_qty;
    31423149                $product['product_id'] = $product_data['product_id'];
    31433150
     
    31773184                }
    31783185                $product['product_name'] = apply_filters("shipi_product_name_change", str_replace('"', '', $getproduct->get_name()), $getproduct->get_id());
    3179                 $product['price'] = (isset($product_data['total']) && $product_data['total'] > 0) ? round($product_data['total']/$product_data['quantity'], 2): $getproduct->get_price();
     3186                $refunded_total = $order->get_total_refunded_for_item( $item->get_id() );
     3187                $remaining_total = $product_data['total'] + $refunded_total;
     3188                $product['price'] = (isset($remaining_total) && $remaining_total > 0) ? round($remaining_total/$remaining_qty, 2): $getproduct->get_price();
    31803189                $product['width'] = (!empty($getproduct->get_width())) ? round(wc_get_dimension($getproduct->get_width(),$mod_dim_unit,$woo_dim_unit)) : '';
    31813190                $product['height'] = (!empty($getproduct->get_height())) ? round(wc_get_dimension($getproduct->get_height(),$mod_dim_unit,$woo_dim_unit)) : '';
  • a2z-fedex-shipping/trunk/readme.txt

    r3405383 r3407061  
    55Tested up to: 6.8
    66Requires PHP: 5.6
    7 Stable tag: 5.1.4
     7Stable tag: 5.1.5
    88License: GPLv3 or later License
    99URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    159159
    160160== Changelog ==
     161= 5.1.5 =
     162    > Bug Fixes.
    161163= 5.1.4 =
    162164    > [New] Load order to shipi.
Note: See TracChangeset for help on using the changeset viewer.