Changeset 2781393
- Timestamp:
- 09/07/2022 02:13:50 PM (4 years ago)
- Location:
- shiptimize-for-woocommerce/trunk
- Files:
-
- 4 edited
-
constants.php (modified) (1 diff)
-
includes/class-woo-shiptimize-order.php (modified) (7 diffs)
-
readme.txt (modified) (1 diff)
-
shiptimize.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
shiptimize-for-woocommerce/trunk/constants.php
r2773641 r2781393 4 4 define( 'SHIPTIMIZE_API_URL', 'https://api.pakketmail.nl/v3' ); 5 5 define( 'SHIPTIMIZE_BRAND', 'Shiptimize' ); 6 define( 'SHIPTIMIZE_VERSION', '3.1.5 1' );6 define( 'SHIPTIMIZE_VERSION', '3.1.53' ); 7 7 define( 'SHIPTIMIZE_CREATE_ACCOUNT', 'https://www.shiptimize.me/quote/' ); 8 8 define( 'SHIPTIMIZE_CHECKOUT', 0); -
shiptimize-for-woocommerce/trunk/includes/class-woo-shiptimize-order.php
r2773641 r2781393 167 167 $this->ShipmentItems = array(); 168 168 169 170 169 foreach( $items as $item ) { 171 170 $product = $item->get_product(); … … 180 179 $productweight = $product->get_weight(); 181 180 if(is_numeric($qty) && is_numeric($productweight)) { 182 $item_weight = wc_get_weight(floatval($ qty * $productweight),'g');181 $item_weight = wc_get_weight(floatval($productweight),'g'); 183 182 } 184 $weight += $item_weight; 183 184 $weight += $qty * $item_weight; 185 185 } 186 186 … … 199 199 } 200 200 } 201 202 201 203 202 if( $weight > 0 ) { … … 321 320 } 322 321 323 if (!$this->Transporter && shiptimize_is_marketplace()){322 if (!$this->Transporter && shiptimize_is_marketplace()) { 324 323 $mkp = ShiptimizeMarketplace::instance(); 325 324 $transporter = $mkp->get_carrier_for_order($this); 326 if ($transporter > 0) {325 if ($transporter > 0) { 327 326 $this->Transporter = $transporter; 328 327 } … … 401 400 402 401 $meta = self::get_shipping_meta($this->ShopItemId); 403 if($meta) { 402 403 if ($meta) { 404 404 $this->shiptimize_message = $meta->message; 405 405 $this->shiptimize_status = $meta->status; 406 406 } 407 407 408 if ( get_locale() == 'pt_BR' ) {408 if ( get_locale() == 'pt_BR' ) { 409 409 $this->set_brazilian_fields(); 410 410 } … … 670 670 if( $product->has_weight() ) { 671 671 $item_weight = wc_get_weight(floatval($qty * $product->get_weight()),'g'); 672 $weight += $ item_weight;672 $weight += $qty * $item_weight; 673 673 } 674 674 … … 686 686 } 687 687 688 if ($replace_total_weight){688 if ($replace_total_weight) { 689 689 $this->Weight = $weight; 690 } 690 } 691 691 692 return $ShipmentItems; 692 693 } -
shiptimize-for-woocommerce/trunk/readme.txt
r2773641 r2781393 58 58 59 59 == Changelog == 60 61 = 3.1.53 - 2022-09-07 = 62 * fix - Item weight should be the weight of the item, not the total of the quantity indicated 63 64 = 3.1.52 - 2022-08-26 = 65 * fix - Total weight did not account for quantity. 66 60 67 = 3.1.51 - 2022-08-19 = 61 68 * enhancement - Always round weights down, some shops will define weights with decimals even in grams. The smaller unit of weight which the API accepts is grams. -
shiptimize-for-woocommerce/trunk/shiptimize.php
r2773641 r2781393 3 3 * Plugin Name: Shiptimize for WooCommerce 4 4 * Description: Shiptimize for WooCommerce 5 * Version: 3.1.5 15 * Version: 3.1.53 6 6 * Author: Shiptimize 7 7 * Author URI: https://shiptimize.me
Note: See TracChangeset
for help on using the changeset viewer.