Changeset 1810924
- Timestamp:
- 01/29/2018 01:54:15 AM (8 years ago)
- Location:
- shipping-by-rules-for-woocommerce
- Files:
-
- 3 edited
- 22 copied
-
tags/2.0.4 (copied) (copied from shipping-by-rules-for-woocommerce/trunk)
-
tags/2.0.4/LICENSE.txt (copied) (copied from shipping-by-rules-for-woocommerce/trunk/LICENSE.txt)
-
tags/2.0.4/assets (copied) (copied from shipping-by-rules-for-woocommerce/trunk/assets)
-
tags/2.0.4/assets/css/admin-styles.css (copied) (copied from shipping-by-rules-for-woocommerce/trunk/assets/css/admin-styles.css)
-
tags/2.0.4/assets/css/legacy-admin-styles.css (copied) (copied from shipping-by-rules-for-woocommerce/trunk/assets/css/legacy-admin-styles.css)
-
tags/2.0.4/assets/js/legacy-shipping-by-rules-config.js (copied) (copied from shipping-by-rules-for-woocommerce/trunk/assets/js/legacy-shipping-by-rules-config.js)
-
tags/2.0.4/assets/js/opentools-updatecheck.js (copied) (copied from shipping-by-rules-for-woocommerce/trunk/assets/js/opentools-updatecheck.js)
-
tags/2.0.4/assets/js/shipping-by-rules-config.js (copied) (copied from shipping-by-rules-for-woocommerce/trunk/assets/js/shipping-by-rules-config.js)
-
tags/2.0.4/includes (copied) (copied from shipping-by-rules-for-woocommerce/trunk/includes)
-
tags/2.0.4/includes/admin/html/html-rulesyntax-help.php (copied) (copied from shipping-by-rules-for-woocommerce/trunk/includes/admin/html/html-rulesyntax-help.php)
-
tags/2.0.4/includes/admin/html/html-shipping-methods.php (copied) (copied from shipping-by-rules-for-woocommerce/trunk/includes/admin/html/html-shipping-methods.php)
-
tags/2.0.4/includes/admin/html/html-upgrade-nag.php (copied) (copied from shipping-by-rules-for-woocommerce/trunk/includes/admin/html/html-upgrade-nag.php)
-
tags/2.0.4/includes/rules-shipping-method.php (copied) (copied from shipping-by-rules-for-woocommerce/trunk/includes/rules-shipping-method.php)
-
tags/2.0.4/includes/rules-shipping-post-type.php (copied) (copied from shipping-by-rules-for-woocommerce/trunk/includes/rules-shipping-post-type.php)
-
tags/2.0.4/includes/rules_shipping_framework_woocommerce.php (copied) (copied from shipping-by-rules-for-woocommerce/trunk/includes/rules_shipping_framework_woocommerce.php) (2 diffs)
-
tags/2.0.4/includes/rules_shipping_framework_woocommerce_advanced.php (copied) (copied from shipping-by-rules-for-woocommerce/trunk/includes/rules_shipping_framework_woocommerce_advanced.php)
-
tags/2.0.4/legacy-includes (copied) (copied from shipping-by-rules-for-woocommerce/trunk/legacy-includes)
-
tags/2.0.4/legacy-woocommerce-shipping-by-rules.php (copied) (copied from shipping-by-rules-for-woocommerce/trunk/legacy-woocommerce-shipping-by-rules.php)
-
tags/2.0.4/library (copied) (copied from shipping-by-rules-for-woocommerce/trunk/library)
-
tags/2.0.4/library/rules_shipping_framework.php (copied) (copied from shipping-by-rules-for-woocommerce/trunk/library/rules_shipping_framework.php)
-
tags/2.0.4/readme.txt (copied) (copied from shipping-by-rules-for-woocommerce/trunk/readme.txt) (2 diffs)
-
tags/2.0.4/woocommerce-shipping-by-rules.php (copied) (copied from shipping-by-rules-for-woocommerce/trunk/woocommerce-shipping-by-rules.php) (2 diffs)
-
trunk/includes/rules_shipping_framework_woocommerce.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/woocommerce-shipping-by-rules.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shipping-by-rules-for-woocommerce/tags/2.0.4/includes/rules_shipping_framework_woocommerce.php
r1779938 r1810924 186 186 foreach ($products as $product) { 187 187 $w = $product['data']->get_weight(); 188 $dimensions['maxweight'] = max ($dimensions['maxweight'], $w); 189 $dimensions['minweight'] = min ($dimensions['minweight'], $w); 190 $dimensions['weight'] += $w * $product['quantity']; 188 if (is_numeric($w)) { 189 $dimensions['maxweight'] = max ($dimensions['maxweight'], $w); 190 $dimensions['minweight'] = min ($dimensions['minweight'], $w); 191 $dimensions['weight'] += $w * $product['quantity']; 192 } 191 193 } 192 194 return $dimensions; … … 233 235 $vendorids = array(); 234 236 foreach ($products as $product) { 235 $vendorids[] = $product['data']->post->post_author; 237 // Variations inherit the vendor from their parent product 238 if (!isset($product['variation_id'])) { 239 // "Normal" product, not a variation 240 $vendorids[] = $product['data']->post->post_author; 241 } else { 242 // A variation => load the parent product instead and use its vendor 243 $vendorids[] = get_post_field('post_author', $product['product_id']); 244 } 236 245 } 237 246 $data['vendorids'] = array_unique($vendorids); -
shipping-by-rules-for-woocommerce/tags/2.0.4/readme.txt
r1779977 r1810924 3 3 Tags: WooCommerce, Shipment, Shipping, Rules shipping 4 4 Requires at least: 4.0 5 Tested up to: 4.9. 16 Stable tag: 2.0. 35 Tested up to: 4.9.2 6 Stable tag: 2.0.4 7 7 License: GPLv3 or later 8 8 License URI: http://www.gnu.org/licenses/gpl.html … … 70 70 == Changelog == 71 71 72 = 2.0.4 = 73 * Compatibility with WC vendors in combination with product variations 74 * Fix PHP warnings 75 72 76 = 2.0.3 = 73 77 * Fix warning when products have no length/width/height assigned (use 0 as default) -
shipping-by-rules-for-woocommerce/tags/2.0.4/woocommerce-shipping-by-rules.php
r1779938 r1810924 4 4 * Plugin URI: http://open-tools.net/woocommerce/advanced-shipping-by-rules-for-woocommerce.html 5 5 * Description: Define Shipping cost by very general and flexible (text-based) rules. 6 * Version: 2.0. 36 * Version: 2.0.4 7 7 * Author: Open Tools, Reinhold Kainhofer 8 8 * Author URI: http://open-tools.net … … 11 11 * License: GPL2+ 12 12 * WC requires at least: 2.2 13 * WC tested up to: 3.2. 313 * WC tested up to: 3.2.6 14 14 15 15 -
shipping-by-rules-for-woocommerce/trunk/includes/rules_shipping_framework_woocommerce.php
r1779938 r1810924 186 186 foreach ($products as $product) { 187 187 $w = $product['data']->get_weight(); 188 $dimensions['maxweight'] = max ($dimensions['maxweight'], $w); 189 $dimensions['minweight'] = min ($dimensions['minweight'], $w); 190 $dimensions['weight'] += $w * $product['quantity']; 188 if (is_numeric($w)) { 189 $dimensions['maxweight'] = max ($dimensions['maxweight'], $w); 190 $dimensions['minweight'] = min ($dimensions['minweight'], $w); 191 $dimensions['weight'] += $w * $product['quantity']; 192 } 191 193 } 192 194 return $dimensions; … … 233 235 $vendorids = array(); 234 236 foreach ($products as $product) { 235 $vendorids[] = $product['data']->post->post_author; 237 // Variations inherit the vendor from their parent product 238 if (!isset($product['variation_id'])) { 239 // "Normal" product, not a variation 240 $vendorids[] = $product['data']->post->post_author; 241 } else { 242 // A variation => load the parent product instead and use its vendor 243 $vendorids[] = get_post_field('post_author', $product['product_id']); 244 } 236 245 } 237 246 $data['vendorids'] = array_unique($vendorids); -
shipping-by-rules-for-woocommerce/trunk/readme.txt
r1779977 r1810924 3 3 Tags: WooCommerce, Shipment, Shipping, Rules shipping 4 4 Requires at least: 4.0 5 Tested up to: 4.9. 16 Stable tag: 2.0. 35 Tested up to: 4.9.2 6 Stable tag: 2.0.4 7 7 License: GPLv3 or later 8 8 License URI: http://www.gnu.org/licenses/gpl.html … … 70 70 == Changelog == 71 71 72 = 2.0.4 = 73 * Compatibility with WC vendors in combination with product variations 74 * Fix PHP warnings 75 72 76 = 2.0.3 = 73 77 * Fix warning when products have no length/width/height assigned (use 0 as default) -
shipping-by-rules-for-woocommerce/trunk/woocommerce-shipping-by-rules.php
r1779938 r1810924 4 4 * Plugin URI: http://open-tools.net/woocommerce/advanced-shipping-by-rules-for-woocommerce.html 5 5 * Description: Define Shipping cost by very general and flexible (text-based) rules. 6 * Version: 2.0. 36 * Version: 2.0.4 7 7 * Author: Open Tools, Reinhold Kainhofer 8 8 * Author URI: http://open-tools.net … … 11 11 * License: GPL2+ 12 12 * WC requires at least: 2.2 13 * WC tested up to: 3.2. 313 * WC tested up to: 3.2.6 14 14 15 15
Note: See TracChangeset
for help on using the changeset viewer.