Printful Integration for WooCommerce - Version 1.1.1

Version Description

Ignore virtual and downloadable products when calculating shipping rates

Download this release

Release Info

Developer printful
Plugin Icon 128x128 Printful Integration for WooCommerce
Version 1.1.1
Comparing to
See all releases

Code changes from version 1.1 to 1.1.1

includes/class-printful-shipping.php CHANGED
@@ -78,12 +78,19 @@ class Printful_Shipping extends WC_Shipping_Method
78
  );
79
 
80
  foreach ($package['contents'] as $item) {
 
 
 
81
  $request['items'] []= array(
82
  'external_variant_id' => $item['variation_id'] ? $item['variation_id'] : $item['product_id'],
83
  'quantity' => $item['quantity']
84
  );
85
  }
86
 
 
 
 
 
87
  try {
88
  $client = Printful_Integration::instance()->get_client();
89
  } catch( PrintfulException $e) {
78
  );
79
 
80
  foreach ($package['contents'] as $item) {
81
+ if (!empty($item['data']) && ($item['data']->is_virtual() || $item['data']->is_downloadable())) {
82
+ continue;
83
+ }
84
  $request['items'] []= array(
85
  'external_variant_id' => $item['variation_id'] ? $item['variation_id'] : $item['product_id'],
86
  'quantity' => $item['quantity']
87
  );
88
  }
89
 
90
+ if (!$request['items']) {
91
+ return false;
92
+ }
93
+
94
  try {
95
  $client = Printful_Integration::instance()->get_client();
96
  } catch( PrintfulException $e) {
printful-shipping.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Printful Integration for WooCommerce
4
  Plugin URI: https://wordpress.org/plugins/printful-shipping-for-woocommerce/
5
  Description: Calculate correct shipping and tax rates for your Printful-Woocommerce integration.
6
- Version: 1.1
7
  Author: Printful
8
  Author URI: http://www.theprintful.com
9
  License: GPL2 http://www.gnu.org/licenses/gpl-2.0.html
3
  Plugin Name: Printful Integration for WooCommerce
4
  Plugin URI: https://wordpress.org/plugins/printful-shipping-for-woocommerce/
5
  Description: Calculate correct shipping and tax rates for your Printful-Woocommerce integration.
6
+ Version: 1.1.1
7
  Author: Printful
8
  Author URI: http://www.theprintful.com
9
  License: GPL2 http://www.gnu.org/licenses/gpl-2.0.html
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: girts_u
3
  Tags: woocommerce, printful, drop shipping, shipping, shipping rates, fulfillment, printing, fedex, carriers, checkout, t-shirts
4
  Requires at least: 3.8
5
  Tested up to: 4.1
6
- Stable tag: 1.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -11,8 +11,8 @@ Calculate live shipping rates and tax rates based on actual Printful shipping co
11
 
12
  == Description ==
13
 
14
- Display actual live shipping rates from carriers like FedEx on your WooCommerce checkout page. This plugin will return a list of available shipping rates specific to the shipping address your customer provides when checking out. These rates are identical to the list you get when you submit an order manually via Printful dashboard.
15
-
16
  This plugin will also automatically calculate taxes where it is required for Printful so that your originally intended profit margin stays intact.
17
 
18
  = Known Limitations =
@@ -24,8 +24,8 @@ This plugin will also automatically calculate taxes where it is required for Pri
24
  1. Upload 'printful-shipping' to the '/wp-content/plugins/' directory
25
  1. Activate the plugin through the 'Plugins' menu in WordPress
26
  1. Add your Printful API key to WooCommerce->Settings->Integration->Integration tab
27
- 1. Enable shipping rate calculation in WooCommerce->Settings->Shipping->Printful Shipping tab
28
- 1. To automatically calculate taxes please check 'Enable taxes and tax calculations' under WooCommerce Tax settings.
29
  1. Then go to 'Integration' tab and check 'Calculate sales tax for locations where it is required for Printful orders'.
30
 
31
  == Frequently Asked Questions ==
@@ -42,6 +42,9 @@ Go to https://www.theprintful.com/dashboard/store , select your WooCommerce stor
42
 
43
  == Upgrade Notice ==
44
 
 
 
 
45
  = 1.1 =
46
  Added tax rate calculation
47
 
@@ -56,6 +59,9 @@ First release
56
 
57
  == Changelog ==
58
 
 
 
 
59
  = 1.1 =
60
  * Added option to calculate sales tax rates for locations where it is required for Printful orders
61
  * Added automatic conversion of shipping rates to the currency used by Woocommerce
3
  Tags: woocommerce, printful, drop shipping, shipping, shipping rates, fulfillment, printing, fedex, carriers, checkout, t-shirts
4
  Requires at least: 3.8
5
  Tested up to: 4.1
6
+ Stable tag: 1.1.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
11
 
12
  == Description ==
13
 
14
+ Display actual live shipping rates from carriers like FedEx on your WooCommerce checkout page. This plugin will return a list of available shipping rates specific to the shipping address your customer provides when checking out. These rates are identical to the list you get when you submit an order manually via Printful dashboard.
15
+
16
  This plugin will also automatically calculate taxes where it is required for Printful so that your originally intended profit margin stays intact.
17
 
18
  = Known Limitations =
24
  1. Upload 'printful-shipping' to the '/wp-content/plugins/' directory
25
  1. Activate the plugin through the 'Plugins' menu in WordPress
26
  1. Add your Printful API key to WooCommerce->Settings->Integration->Integration tab
27
+ 1. Enable shipping rate calculation in WooCommerce->Settings->Shipping->Printful Shipping tab
28
+ 1. To automatically calculate taxes please check 'Enable taxes and tax calculations' under WooCommerce Tax settings.
29
  1. Then go to 'Integration' tab and check 'Calculate sales tax for locations where it is required for Printful orders'.
30
 
31
  == Frequently Asked Questions ==
42
 
43
  == Upgrade Notice ==
44
 
45
+ = 1.1.1 =
46
+ Ignore virtual and downloadable products when calculating shipping rates
47
+
48
  = 1.1 =
49
  Added tax rate calculation
50
 
59
 
60
  == Changelog ==
61
 
62
+ = 1.1.1 =
63
+ * Ignore virtual and downloadable products when calculating shipping rates
64
+
65
  = 1.1 =
66
  * Added option to calculate sales tax rates for locations where it is required for Printful orders
67
  * Added automatic conversion of shipping rates to the currency used by Woocommerce