WooCommerce ShipStation Gateway - Version 4.3.2

Version Description

  • 2022-11-29 =
  • Fix - Use product variation name when exporting a product variation.
Download this release

Release Info

Developer harriswong
Plugin Icon 128x128 WooCommerce ShipStation Gateway
Version 4.3.2
Comparing to
See all releases

Code changes from version 4.3.1 to 4.3.2

changelog.txt CHANGED
@@ -1,5 +1,8 @@
1
  *** ShipStation for WooCommerce ***
2
 
 
 
 
3
  = 4.3.1 - 2022-10-25 =
4
  * Add - Declared HPOS compatibility.
5
 
1
  *** ShipStation for WooCommerce ***
2
 
3
+ = 4.3.2 - 2022-11-29 =
4
+ * Fix - Use product variation name when exporting a product variation.
5
+
6
  = 4.3.1 - 2022-10-25 =
7
  * Add - Declared HPOS compatibility.
8
 
includes/api-requests/class-wc-shipstation-api-export.php CHANGED
@@ -201,7 +201,7 @@ class WC_Shipstation_API_Export extends WC_Shipstation_API_Request {
201
  foreach ( $order_items as $item_id => $item ) {
202
  $product = is_callable( array( $item, 'get_product' ) ) ? $item->get_product() : false;
203
  $item_needs_no_shipping = ! $product || ! $product->needs_shipping();
204
- $item_not_a_fee = 'fee' !== $item['type'];
205
  if ( apply_filters( 'woocommerce_shipstation_no_shipping_item', $item_needs_no_shipping && $item_not_a_fee, $product, $item ) ) {
206
  continue;
207
  }
@@ -210,7 +210,7 @@ class WC_Shipstation_API_Export extends WC_Shipstation_API_Request {
210
  $item_xml = $xml->createElement( 'Item' );
211
  $this->xml_append( $item_xml, 'LineItemID', $item_id );
212
 
213
- if ( 'fee' === $item['type'] ) {
214
  $this->xml_append( $item_xml, 'Name', $item->get_name() );
215
  $this->xml_append( $item_xml, 'Quantity', 1, false );
216
  $this->xml_append( $item_xml, 'UnitPrice', $order->get_item_total( $item, false, true ), false );
@@ -219,7 +219,7 @@ class WC_Shipstation_API_Export extends WC_Shipstation_API_Request {
219
  // handle product specific data.
220
  if ( $product && $product->needs_shipping() ) {
221
  $this->xml_append( $item_xml, 'SKU', $product->get_sku() );
222
- $this->xml_append( $item_xml, 'Name', $product->get_title() );
223
  // image data.
224
  $image_id = $product->get_image_id();
225
  $image_url = $image_id ? current( wp_get_attachment_image_src( $image_id, 'woocommerce_gallery_thumbnail' ) ) : '';
@@ -234,12 +234,12 @@ class WC_Shipstation_API_Export extends WC_Shipstation_API_Request {
234
  }
235
 
236
  // current item quantity - refunded quantity.
237
- $item_qty = $item['qty'] - abs( $order->get_qty_refunded_for_item( $item_id ) );
238
  $this->xml_append( $item_xml, 'Quantity', $item_qty, false );
239
  $this->xml_append( $item_xml, 'UnitPrice', $order->get_item_subtotal( $item, false, true ), false );
240
  }
241
 
242
- if ( $item['item_meta'] ) {
243
  add_filter( 'woocommerce_is_attribute_in_product_name', '__return_false' );
244
  $formatted_meta = $item->get_formatted_meta_data();
245
 
201
  foreach ( $order_items as $item_id => $item ) {
202
  $product = is_callable( array( $item, 'get_product' ) ) ? $item->get_product() : false;
203
  $item_needs_no_shipping = ! $product || ! $product->needs_shipping();
204
+ $item_not_a_fee = 'fee' !== $item->get_type();
205
  if ( apply_filters( 'woocommerce_shipstation_no_shipping_item', $item_needs_no_shipping && $item_not_a_fee, $product, $item ) ) {
206
  continue;
207
  }
210
  $item_xml = $xml->createElement( 'Item' );
211
  $this->xml_append( $item_xml, 'LineItemID', $item_id );
212
 
213
+ if ( 'fee' === $item->get_type() ) {
214
  $this->xml_append( $item_xml, 'Name', $item->get_name() );
215
  $this->xml_append( $item_xml, 'Quantity', 1, false );
216
  $this->xml_append( $item_xml, 'UnitPrice', $order->get_item_total( $item, false, true ), false );
219
  // handle product specific data.
220
  if ( $product && $product->needs_shipping() ) {
221
  $this->xml_append( $item_xml, 'SKU', $product->get_sku() );
222
+ $this->xml_append( $item_xml, 'Name', $item->get_name() );
223
  // image data.
224
  $image_id = $product->get_image_id();
225
  $image_url = $image_id ? current( wp_get_attachment_image_src( $image_id, 'woocommerce_gallery_thumbnail' ) ) : '';
234
  }
235
 
236
  // current item quantity - refunded quantity.
237
+ $item_qty = $item->get_quantity() - abs( $order->get_qty_refunded_for_item( $item_id ) );
238
  $this->xml_append( $item_xml, 'Quantity', $item_qty, false );
239
  $this->xml_append( $item_xml, 'UnitPrice', $order->get_item_subtotal( $item, false, true ), false );
240
  }
241
 
242
+ if ( $item->get_meta_data() ) {
243
  add_filter( 'woocommerce_is_attribute_in_product_name', '__return_false' );
244
  $formatted_meta = $item->get_formatted_meta_data();
245
 
languages/woocommerce-shipstation.pot CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the same license as the WooCommerce - ShipStation Integration package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WooCommerce - ShipStation Integration 4.3.1\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/woocommerce-shipstation\n"
8
- "POT-Creation-Date: 2022-10-25 18:13:25+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
2
  # This file is distributed under the same license as the WooCommerce - ShipStation Integration package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WooCommerce - ShipStation Integration 4.3.2\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/woocommerce-shipstation\n"
8
+ "POT-Creation-Date: 2022-11-29 22:02:19+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tested up to: 6.0.2
6
  WC tested up to: 7.0.0
7
  WC requires at least: 3.4.0
8
  Requires PHP: 5.6
9
- Stable tag: 4.3.1
10
  License: GPLv3
11
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
12
 
@@ -48,6 +48,9 @@ If you get stuck, you can ask for help in the Plugin Forum.
48
 
49
  == Changelog ==
50
 
 
 
 
51
  = 4.3.1 - 2022-10-25 =
52
  * Add - Declared HPOS compatibility.
53
 
6
  WC tested up to: 7.0.0
7
  WC requires at least: 3.4.0
8
  Requires PHP: 5.6
9
+ Stable tag: 4.3.2
10
  License: GPLv3
11
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
12
 
48
 
49
  == Changelog ==
50
 
51
+ = 4.3.2 - 2022-11-29 =
52
+ * Fix - Use product variation name when exporting a product variation.
53
+
54
  = 4.3.1 - 2022-10-25 =
55
  * Add - Declared HPOS compatibility.
56
 
woocommerce-shipstation.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: WooCommerce - ShipStation Integration
4
  * Plugin URI: https://woocommerce.com/products/shipstation-integration/
5
- * Version: 4.3.1
6
  * Description: Adds ShipStation label printing support to WooCommerce. Requires server DomDocument support.
7
  * Author: WooCommerce
8
  * Author URI: https://woocommerce.com/
@@ -41,7 +41,7 @@ function woocommerce_shipstation_init() {
41
  return;
42
  }
43
 
44
- define( 'WC_SHIPSTATION_VERSION', '4.3.1' ); // WRCS: DEFINED_VERSION.
45
  define( 'WC_SHIPSTATION_FILE', __FILE__ );
46
 
47
  if ( ! defined( 'WC_SHIPSTATION_EXPORT_LIMIT' ) ) {
2
  /**
3
  * Plugin Name: WooCommerce - ShipStation Integration
4
  * Plugin URI: https://woocommerce.com/products/shipstation-integration/
5
+ * Version: 4.3.2
6
  * Description: Adds ShipStation label printing support to WooCommerce. Requires server DomDocument support.
7
  * Author: WooCommerce
8
  * Author URI: https://woocommerce.com/
41
  return;
42
  }
43
 
44
+ define( 'WC_SHIPSTATION_VERSION', '4.3.2' ); // WRCS: DEFINED_VERSION.
45
  define( 'WC_SHIPSTATION_FILE', __FILE__ );
46
 
47
  if ( ! defined( 'WC_SHIPSTATION_EXPORT_LIMIT' ) ) {