WooCommerce ShipStation Gateway - Version 4.1.27

Version Description

Download this release

Release Info

Developer royho
Plugin Icon 128x128 WooCommerce ShipStation Gateway
Version 4.1.27
Comparing to
See all releases

Code changes from version 4.1.26 to 4.1.27

changelog.txt CHANGED
@@ -1,5 +1,9 @@
1
  *** ShipStation for WooCommerce ***
2
 
 
 
 
 
3
  = 2018-12-10 - version 4.1.26 =
4
  * Update - Setup notice link to WooCommerce-specific landing page.
5
 
1
  *** ShipStation for WooCommerce ***
2
 
3
+ = 2019-01-07 - version 4.1.27 =
4
+ * Fix - Use product name from order instead of product itself.
5
+ * Fix - Prevent errors when WooCommerce isn't active.
6
+
7
  = 2018-12-10 - version 4.1.26 =
8
  * Update - Setup notice link to WooCommerce-specific landing page.
9
 
includes/api-requests/class-wc-shipstation-api-export.php CHANGED
@@ -222,7 +222,7 @@ class WC_Shipstation_API_Export extends WC_Shipstation_API_Request {
222
  $this->xml_append( $item_xml, 'LineItemID', $item_id );
223
 
224
  if ( 'fee' === $item['type'] ) {
225
- $this->xml_append( $item_xml, 'Name', $item['name'] );
226
  $this->xml_append( $item_xml, 'Quantity', 1, false );
227
  $this->xml_append( $item_xml, 'UnitPrice', $order->get_item_total( $item, false, true ), false );
228
  }
222
  $this->xml_append( $item_xml, 'LineItemID', $item_id );
223
 
224
  if ( 'fee' === $item['type'] ) {
225
+ $this->xml_append( $item_xml, 'Name', $wc_gte_30 ? $item->get_name() : $item['name'] );
226
  $this->xml_append( $item_xml, 'Quantity', 1, false );
227
  $this->xml_append( $item_xml, 'UnitPrice', $order->get_item_total( $item, false, true ), false );
228
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: shipping, woocommerce, automattic
4
  Requires at least: 4.4
5
  Tested up to: 5.0
6
  Requires PHP: 5.6
7
- Stable tag: 4.1.26
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -46,17 +46,8 @@ If you get stuck, you can ask for help in the Plugin Forum.
46
 
47
  == Changelog ==
48
 
49
- = 2018-12-10 - version 4.1.26 =
50
- * Update - Setup notice link to WooCommerce-specific landing page.
 
51
 
52
- = 2018-11-08 - version 4.1.25 =
53
- * Update - WP 5.0 compatibility.
54
-
55
- = 2018-10-18 - version 4.1.24 =
56
- * Fix - Add missing language .pot file.
57
- * Update - WC 3.5 compatibility.
58
-
59
- = 2018-09-12 - version 4.1.23 =
60
- * Fix - Use correct textdomain on some strings.
61
- * Tweak - Rework settings notice to correctly provide setup instructions.
62
- * Tweak - Coding standards and making the plugin ready for wordpress.org.
4
  Requires at least: 4.4
5
  Tested up to: 5.0
6
  Requires PHP: 5.6
7
+ Stable tag: 4.1.27
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
46
 
47
  == Changelog ==
48
 
49
+ = 2019-01-07 - version 4.1.27 =
50
+ * Fix - Use product name from order instead of product itself.
51
+ * Fix - Prevent errors when WooCommerce isn't active.
52
 
53
+ [See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce-shipstation/master/changelog.txt).
 
 
 
 
 
 
 
 
 
 
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.26
6
  * Description: Adds ShipStation label printing support to WooCommerce. Requires server DomDocument support.
7
  * Author: WooCommerce
8
  * Author URI: https://woocommerce.com/
@@ -17,20 +17,37 @@ if ( ! defined( 'ABSPATH' ) ) {
17
  exit;
18
  }
19
 
 
 
 
 
 
 
 
 
 
 
 
20
  /**
21
  * Include shipstation class.
22
  *
23
  * @since 1.0.0
24
  */
25
  function woocommerce_shipstation_init() {
26
- define( 'WC_SHIPSTATION_VERSION', '4.1.26' );
 
 
 
 
 
 
 
27
  define( 'WC_SHIPSTATION_FILE', __FILE__ );
28
 
29
  if ( ! defined( 'WC_SHIPSTATION_EXPORT_LIMIT' ) ) {
30
  define( 'WC_SHIPSTATION_EXPORT_LIMIT', 100 );
31
  }
32
 
33
- load_plugin_textdomain( 'woocommerce-shipstation', false, basename( dirname( __FILE__ ) ) . '/languages' );
34
 
35
  include_once( 'includes/class-wc-shipstation-integration.php' );
36
  include_once( 'includes/class-wc-shipstation-privacy.php' );
2
  /**
3
  * Plugin Name: WooCommerce - ShipStation Integration
4
  * Plugin URI: https://woocommerce.com/products/shipstation-integration/
5
+ * Version: 4.1.27
6
  * Description: Adds ShipStation label printing support to WooCommerce. Requires server DomDocument support.
7
  * Author: WooCommerce
8
  * Author URI: https://woocommerce.com/
17
  exit;
18
  }
19
 
20
+ /**
21
+ * WooCommerce fallback notice.
22
+ *
23
+ * @since 4.1.26
24
+ * @return string
25
+ */
26
+ function woocommerce_shipstation_missing_wc_notice() {
27
+ /* translators: %s WC download URL link. */
28
+ echo '<div class="error"><p><strong>' . sprintf( esc_html__( 'Shipstation requires WooCommerce to be installed and active. You can download %s here.', 'woocommerce-shipstation' ), '<a href="https://woocommerce.com/" target="_blank">WooCommerce</a>' ) . '</strong></p></div>';
29
+ }
30
+
31
  /**
32
  * Include shipstation class.
33
  *
34
  * @since 1.0.0
35
  */
36
  function woocommerce_shipstation_init() {
37
+ load_plugin_textdomain( 'woocommerce-shipstation', false, basename( dirname( __FILE__ ) ) . '/languages' );
38
+
39
+ if ( ! class_exists( 'WooCommerce' ) ) {
40
+ add_action( 'admin_notices', 'woocommerce_shipstation_missing_wc_notice' );
41
+ return;
42
+ }
43
+
44
+ define( 'WC_SHIPSTATION_VERSION', '4.1.27' );
45
  define( 'WC_SHIPSTATION_FILE', __FILE__ );
46
 
47
  if ( ! defined( 'WC_SHIPSTATION_EXPORT_LIMIT' ) ) {
48
  define( 'WC_SHIPSTATION_EXPORT_LIMIT', 100 );
49
  }
50
 
 
51
 
52
  include_once( 'includes/class-wc-shipstation-integration.php' );
53
  include_once( 'includes/class-wc-shipstation-privacy.php' );