WooCommerce ShipStation Gateway - Version 4.1.48

Version Description

  • 2021-11-03 =
  • Fix - Critical Error when null value is passed to appendChild method.
  • Fix - $logging_enabled compared against string instead of boolean.
Download this release

Release Info

Developer superdav42
Plugin Icon 128x128 WooCommerce ShipStation Gateway
Version 4.1.48
Comparing to
See all releases

Code changes from version 4.1.46 to 4.1.48

changelog.txt CHANGED
@@ -1,5 +1,12 @@
1
  *** ShipStation for WooCommerce ***
2
 
 
 
 
 
 
 
 
3
  = 4.1.46 - 2021-09-10 =
4
  * Fix - Order is not changed to completed when the order has partial refund and is marked as shipped in ShipStation.
5
 
1
  *** ShipStation for WooCommerce ***
2
 
3
+ = 4.1.48 - 2021-11-03 =
4
+ * Fix - Critical Error when null value is passed to appendChild method.
5
+ * Fix - $logging_enabled compared against string instead of boolean.
6
+
7
+ = 4.1.47 - 2021-09-29 =
8
+ * Fix - Change API Export order search to be accurate down to the second, not just the date.
9
+
10
  = 4.1.46 - 2021-09-10 =
11
  * Fix - Order is not changed to completed when the order has partial refund and is marked as shipped in ShipStation.
12
 
includes/api-requests/class-wc-shipstation-api-export.php CHANGED
@@ -59,7 +59,7 @@ class WC_Shipstation_API_Export extends WC_Shipstation_API_Request {
59
 
60
  if ( version_compare( WC_VERSION, '3.1', '>=' ) ) {
61
  $order_ids = wc_get_orders( array(
62
- 'date_modified' => $start_date . '...' . $end_date,
63
  'type' => 'shop_order',
64
  'status' => WC_ShipStation_Integration::$export_statuses,
65
  'return' => 'ids',
@@ -376,11 +376,14 @@ class WC_Shipstation_API_Export extends WC_Shipstation_API_Request {
376
  */
377
  private function xml_append( $append_to, $name, $value, $cdata = true ) {
378
  $data = $append_to->appendChild( $append_to->ownerDocument->createElement( $name ) );
 
379
  if ( $cdata ) {
380
- $data->appendChild( $append_to->ownerDocument->createCDATASection( $value ) );
381
  } else {
382
- $data->appendChild( $append_to->ownerDocument->createTextNode( $value ) );
383
  }
 
 
384
  }
385
 
386
  /**
59
 
60
  if ( version_compare( WC_VERSION, '3.1', '>=' ) ) {
61
  $order_ids = wc_get_orders( array(
62
+ 'date_modified' => strtotime( $start_date ) . '...' . strtotime( $end_date ),
63
  'type' => 'shop_order',
64
  'status' => WC_ShipStation_Integration::$export_statuses,
65
  'return' => 'ids',
376
  */
377
  private function xml_append( $append_to, $name, $value, $cdata = true ) {
378
  $data = $append_to->appendChild( $append_to->ownerDocument->createElement( $name ) );
379
+
380
  if ( $cdata ) {
381
+ $child_node = empty( $append_to->ownerDocument->createCDATASection( $value ) ) ? $append_to->ownerDocument->createCDATASection( '' ) : $append_to->ownerDocument->createCDATASection( $value );
382
  } else {
383
+ $child_node = empty( $append_to->ownerDocument->createTextNode( $value ) ) ? $append_to->ownerDocument->createTextNode( '' ) : $append_to->ownerDocument->createTextNode( $value );
384
  }
385
+
386
+ $data->appendChild( $child_node );
387
  }
388
 
389
  /**
includes/api-requests/class-wc-shipstation-api-request.php CHANGED
@@ -20,7 +20,7 @@ abstract class WC_Shipstation_API_Request {
20
  * @param string $message
21
  */
22
  public function log( $message ) {
23
- if ( 'no' === WC_ShipStation_Integration::$logging_enabled ) {
24
  return;
25
  }
26
  if ( is_null( $this->log ) ) {
20
  * @param string $message
21
  */
22
  public function log( $message ) {
23
+ if ( ! WC_ShipStation_Integration::$logging_enabled ) {
24
  return;
25
  }
26
  if ( is_null( $this->log ) ) {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: shipping, woocommerce, automattic
4
  Requires at least: 4.4
5
  Tested up to: 5.8
6
  Requires PHP: 5.6
7
- Stable tag: 4.1.46
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -46,6 +46,13 @@ If you get stuck, you can ask for help in the Plugin Forum.
46
 
47
  == Changelog ==
48
 
 
 
 
 
 
 
 
49
  = 4.1.46 - 2021-09-10 =
50
  * Fix - Order is not changed to completed when the order has partial refund and is marked as shipped in ShipStation.
51
 
4
  Requires at least: 4.4
5
  Tested up to: 5.8
6
  Requires PHP: 5.6
7
+ Stable tag: 4.1.48
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
46
 
47
  == Changelog ==
48
 
49
+ = 4.1.48 - 2021-11-03 =
50
+ * Fix - Critical Error when null value is passed to appendChild method.
51
+ * Fix - $logging_enabled compared against string instead of boolean.
52
+
53
+ = 4.1.47 - 2021-09-29 =
54
+ * Fix - Change API Export order search to be accurate down to the second, not just the date.
55
+
56
  = 4.1.46 - 2021-09-10 =
57
  * Fix - Order is not changed to completed when the order has partial refund and is marked as shipped in ShipStation.
58
 
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.1.46
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.1.46' ); // 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.1.48
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.1.48' ); // WRCS: DEFINED_VERSION.
45
  define( 'WC_SHIPSTATION_FILE', __FILE__ );
46
 
47
  if ( ! defined( 'WC_SHIPSTATION_EXPORT_LIMIT' ) ) {