WooCommerce ShipStation Gateway - Version 4.1.44

Version Description

  • 2021-08-12 =
  • Fix - Changing text domain to "woocommerce-shipstation-integration" to match with plugin slug.
  • Fix - Order product quantities do not sync to Shipstation when using a refund.
  • Fix - PHP notice error "wc_cog_order_total_cost" was called incorrectly.
Download this release

Release Info

Developer shellbeezy
Plugin Icon 128x128 WooCommerce ShipStation Gateway
Version 4.1.44
Comparing to
See all releases

Code changes from version 4.1.43 to 4.1.44

changelog.txt CHANGED
@@ -1,5 +1,10 @@
1
  *** ShipStation for WooCommerce ***
2
 
 
 
 
 
 
3
  = 4.1.43 - 2021-07-27 =
4
  * Fix - API returns status code 200 even when errors exist.
5
  * Tweak - Add version compare for deprecated Order::get_product_from_item().
1
  *** ShipStation for WooCommerce ***
2
 
3
+ = 4.1.44 - 2021-08-12 =
4
+ * Fix - Changing text domain to "woocommerce-shipstation-integration" to match with plugin slug.
5
+ * Fix - Order product quantities do not sync to Shipstation when using a refund.
6
+ * Fix - PHP notice error "wc_cog_order_total_cost" was called incorrectly.
7
+
8
  = 4.1.43 - 2021-07-27 =
9
  * Fix - API returns status code 200 even when errors exist.
10
  * Tweak - Add version compare for deprecated Order::get_product_from_item().
includes/api-requests/class-wc-shipstation-api-export.php CHANGED
@@ -126,9 +126,10 @@ class WC_Shipstation_API_Export extends WC_Shipstation_API_Request {
126
  $order_timestamp = $order->order_date;
127
  }
128
 
129
- $order_timestamp -= $tz_offset;
 
130
  $this->xml_append( $order_xml, 'OrderDate', gmdate( 'm/d/Y H:i', $order_timestamp ), false );
131
- $this->xml_append( $order_xml, 'OrderStatus', $order->get_status() );
132
  $this->xml_append( $order_xml, 'PaymentMethod', $wc_gte_30 ? $order->get_payment_method() : $order->payment_method );
133
  $this->xml_append( $order_xml, 'OrderPaymentMethodTitle', $wc_gte_30 ? $order->get_payment_method_title() : $order->payment_method_title );
134
  $last_modified = strtotime( $wc_gte_30 ? $order->get_date_modified()->date( 'm/d/Y H:i' ) : $order->modified_date ) - $tz_offset;
@@ -136,11 +137,11 @@ class WC_Shipstation_API_Export extends WC_Shipstation_API_Request {
136
  $this->xml_append( $order_xml, 'ShippingMethod', implode( ' | ', $this->get_shipping_methods( $order ) ) );
137
 
138
  $this->xml_append( $order_xml, 'CurrencyCode', $order->get_currency(), false );
139
- $this->xml_append( $order_xml, 'OrderTotal', $order->get_total(), false );
140
  $this->xml_append( $order_xml, 'TaxAmount', wc_round_tax_total( $order->get_total_tax() ), false );
141
 
142
  if ( class_exists( 'WC_COG' ) ) {
143
- $this->xml_append( $order_xml, 'CostOfGoods', wc_format_decimal( $order->wc_cog_order_total_cost ), false );
144
  }
145
 
146
  $this->xml_append( $order_xml, 'ShippingAmount', $wc_gte_30 ? $order->get_shipping_total() : $order->get_total_shipping(), false );
@@ -246,8 +247,10 @@ class WC_Shipstation_API_Export extends WC_Shipstation_API_Request {
246
  $this->xml_append( $item_xml, 'Weight', $product->get_weight(), false );
247
  $this->xml_append( $item_xml, 'WeightUnits', $this->get_shipstation_weight_units( $store_weight_unit ), false );
248
  }
249
-
250
- $this->xml_append( $item_xml, 'Quantity', $item['qty'], false );
 
 
251
  $this->xml_append( $item_xml, 'UnitPrice', $order->get_item_subtotal( $item, false, true ), false );
252
  }
253
 
@@ -292,7 +295,7 @@ class WC_Shipstation_API_Export extends WC_Shipstation_API_Request {
292
  if ( $order->get_total_discount() ) {
293
  $item_xml = $xml->createElement( 'Item' );
294
  $this->xml_append( $item_xml, 'SKU', 'total-discount' );
295
- $this->xml_append( $item_xml, 'Name', __( 'Total Discount', 'woocommerce-shipstation' ) );
296
  $this->xml_append( $item_xml, 'Adjustment', 'true', false );
297
  $this->xml_append( $item_xml, 'Quantity', 1, false );
298
  $this->xml_append( $item_xml, 'UnitPrice', $order->get_total_discount() * -1, false );
@@ -307,7 +310,7 @@ class WC_Shipstation_API_Export extends WC_Shipstation_API_Request {
307
 
308
  // Add order note to indicate it has been exported to Shipstation.
309
  if ( 'yes' !== get_post_meta( $order_id, '_shipstation_exported', true ) ) {
310
- $order->add_order_note( __( 'Order has been exported to Shipstation', 'woocommerce-shipstation' ) );
311
  update_post_meta( $order_id, '_shipstation_exported', 'yes' );
312
  }
313
  }
@@ -318,7 +321,7 @@ class WC_Shipstation_API_Export extends WC_Shipstation_API_Request {
318
  echo $xml->saveXML();
319
 
320
  /* translators: 1: total count */
321
- $this->log( sprintf( __( 'Exported %s orders', 'woocommerce-shipstation' ), $exported ) );
322
  }
323
 
324
  /**
126
  $order_timestamp = $order->order_date;
127
  }
128
 
129
+ $order_timestamp -= $tz_offset;
130
+ $order_status = ( 'refunded' === $order->get_status() ) ? 'cancelled' : $order->get_status();
131
  $this->xml_append( $order_xml, 'OrderDate', gmdate( 'm/d/Y H:i', $order_timestamp ), false );
132
+ $this->xml_append( $order_xml, 'OrderStatus', $order_status );
133
  $this->xml_append( $order_xml, 'PaymentMethod', $wc_gte_30 ? $order->get_payment_method() : $order->payment_method );
134
  $this->xml_append( $order_xml, 'OrderPaymentMethodTitle', $wc_gte_30 ? $order->get_payment_method_title() : $order->payment_method_title );
135
  $last_modified = strtotime( $wc_gte_30 ? $order->get_date_modified()->date( 'm/d/Y H:i' ) : $order->modified_date ) - $tz_offset;
137
  $this->xml_append( $order_xml, 'ShippingMethod', implode( ' | ', $this->get_shipping_methods( $order ) ) );
138
 
139
  $this->xml_append( $order_xml, 'CurrencyCode', $order->get_currency(), false );
140
+ $this->xml_append( $order_xml, 'OrderTotal', ( $order->get_total() - $order->get_total_refunded() ), false );
141
  $this->xml_append( $order_xml, 'TaxAmount', wc_round_tax_total( $order->get_total_tax() ), false );
142
 
143
  if ( class_exists( 'WC_COG' ) ) {
144
+ $this->xml_append( $order_xml, 'CostOfGoods', wc_format_decimal( $order->get_meta( '_wc_cog_order_total_cost', true ) ), false );
145
  }
146
 
147
  $this->xml_append( $order_xml, 'ShippingAmount', $wc_gte_30 ? $order->get_shipping_total() : $order->get_total_shipping(), false );
247
  $this->xml_append( $item_xml, 'Weight', $product->get_weight(), false );
248
  $this->xml_append( $item_xml, 'WeightUnits', $this->get_shipstation_weight_units( $store_weight_unit ), false );
249
  }
250
+
251
+ // current item quantity - refunded quantity
252
+ $item_qty = $item['qty'] - abs( $order->get_qty_refunded_for_item( $item_id ) );
253
+ $this->xml_append( $item_xml, 'Quantity', $item_qty, false );
254
  $this->xml_append( $item_xml, 'UnitPrice', $order->get_item_subtotal( $item, false, true ), false );
255
  }
256
 
295
  if ( $order->get_total_discount() ) {
296
  $item_xml = $xml->createElement( 'Item' );
297
  $this->xml_append( $item_xml, 'SKU', 'total-discount' );
298
+ $this->xml_append( $item_xml, 'Name', __( 'Total Discount', 'woocommerce-shipstation-integration' ) );
299
  $this->xml_append( $item_xml, 'Adjustment', 'true', false );
300
  $this->xml_append( $item_xml, 'Quantity', 1, false );
301
  $this->xml_append( $item_xml, 'UnitPrice', $order->get_total_discount() * -1, false );
310
 
311
  // Add order note to indicate it has been exported to Shipstation.
312
  if ( 'yes' !== get_post_meta( $order_id, '_shipstation_exported', true ) ) {
313
+ $order->add_order_note( __( 'Order has been exported to Shipstation', 'woocommerce-shipstation-integration' ) );
314
  update_post_meta( $order_id, '_shipstation_exported', 'yes' );
315
  }
316
  }
321
  echo $xml->saveXML();
322
 
323
  /* translators: 1: total count */
324
+ $this->log( sprintf( __( 'Exported %s orders', 'woocommerce-shipstation-integration' ), $exported ) );
325
  }
326
 
327
  /**
includes/api-requests/class-wc-shipstation-api-request.php CHANGED
@@ -42,7 +42,7 @@ abstract class WC_Shipstation_API_Request {
42
  foreach ( $required_fields as $required ) {
43
  if ( empty( $_GET[ $required ] ) ) {
44
  /* translators: 1: field name */
45
- $this->trigger_error( sprintf( __( 'Missing required param: %s', 'woocommerce-shipstation' ), $required ) );
46
  }
47
  }
48
  }
42
  foreach ( $required_fields as $required ) {
43
  if ( empty( $_GET[ $required ] ) ) {
44
  /* translators: 1: field name */
45
+ $this->trigger_error( sprintf( __( 'Missing required param: %s', 'woocommerce-shipstation-integration' ), $required ) );
46
  }
47
  }
48
  }
includes/api-requests/class-wc-shipstation-api-shipnotify.php CHANGED
@@ -183,7 +183,7 @@ class WC_Shipstation_API_Shipnotify extends WC_Shipstation_API_Request {
183
 
184
  if ( empty( $shipstation_xml ) ) {
185
  $can_parse_xml = false;
186
- $this->log( __( 'Missing ShipNotify XML input.', 'woocommerce-shipstation' ) );
187
 
188
  $mask = array(
189
  'auth_key' => '***',
@@ -203,17 +203,17 @@ class WC_Shipstation_API_Shipnotify extends WC_Shipstation_API_Request {
203
 
204
  if ( ! function_exists( 'simplexml_import_dom' ) ) {
205
  $can_parse_xml = false;
206
- $this->log( __( 'Missing SimpleXML extension for parsing ShipStation XML.', 'woocommerce-shipstation' ) );
207
  }
208
 
209
  // Try to parse XML first since it can contain the real OrderID.
210
  if ( $can_parse_xml ) {
211
- $this->log( __( 'ShipNotify XML: ', 'woocommerce-shipstation' ) . print_r( $shipstation_xml, true ) );
212
 
213
  $xml = $this->get_parsed_xml( $shipstation_xml );
214
 
215
  if ( ! $xml ) {
216
- $this->log( __( 'Cannot parse XML', 'woocommerce-shipstation' ) );
217
  status_header( 500 );
218
  }
219
 
@@ -234,8 +234,7 @@ class WC_Shipstation_API_Shipnotify extends WC_Shipstation_API_Request {
234
 
235
  if ( false === $order || ! is_object( $order ) ) {
236
  /* translators: 1: order id */
237
- $this->log( sprintf( __( 'Order %s can not be found.', 'woocommerce-shipstation' ), $order_id ) );
238
- status_header( 400 );
239
  exit;
240
  }
241
 
@@ -243,8 +242,7 @@ class WC_Shipstation_API_Shipnotify extends WC_Shipstation_API_Request {
243
  $order_id = version_compare( WC_VERSION, '3.0.0', '<' ) ? $order->id : $order->get_id();
244
  if ( empty( $order_id ) ) {
245
  /* translators: 1: order id */
246
- $this->log( sprintf( __( 'Invalid order ID: %s', 'woocommerce-shipstation' ), $order_id ) );
247
- status_header( 400 );
248
  exit;
249
  }
250
 
@@ -253,7 +251,7 @@ class WC_Shipstation_API_Shipnotify extends WC_Shipstation_API_Request {
253
  $items = $xml->Items;
254
  if ( $items ) {
255
  foreach ( $items->Item as $item ) {
256
- $this->log( __( 'ShipNotify Item: ', 'woocommerce-shipstation' ) . print_r( $item, true ) );
257
 
258
  $item_sku = wc_clean( (string) $item->SKU );
259
  $item_name = wc_clean( (string) $item->Name );
@@ -266,7 +264,7 @@ class WC_Shipstation_API_Shipnotify extends WC_Shipstation_API_Request {
266
  $item_id = wc_clean( (int) $item->LineItemID );
267
  if ( ! $this->is_shippable_item( $order, $item_id ) ) {
268
  /* translators: 1: item name */
269
- $this->log( sprintf( __( 'Item %s is not shippable product. Skipping.', 'woocommerce-shipstation' ), $item_name ) );
270
  continue;
271
  }
272
 
@@ -284,7 +282,7 @@ class WC_Shipstation_API_Shipnotify extends WC_Shipstation_API_Request {
284
  if ( sizeof( $shipped_items ) > 0 ) {
285
  $order_note = sprintf(
286
  /* translators: 1) shipped items 2) carrier's name 3) shipped date, 4) tracking number */
287
- __( '%1$s shipped via %2$s on %3$s with tracking number %4$s.', 'woocommerce-shipstation' ),
288
  esc_html( implode( ', ', $shipped_items ) ),
289
  esc_html( $carrier ),
290
  date_i18n( get_option( 'date_format' ), $timestamp ),
@@ -300,7 +298,7 @@ class WC_Shipstation_API_Shipnotify extends WC_Shipstation_API_Request {
300
  $this->log(
301
  sprintf(
302
  /* translators: 1) number of shipped items 2) total shipped items 3) order ID */
303
- __( 'Shipped %1$d out of %2$d items in order %3$s', 'woocommerce-shipstation' ),
304
  $shipped_item_count,
305
  $total_item_count,
306
  $order_id
@@ -316,14 +314,14 @@ class WC_Shipstation_API_Shipnotify extends WC_Shipstation_API_Request {
316
 
317
  $order_note = sprintf(
318
  /* translators: 1) carrier's name 2) shipped date, 3) tracking number */
319
- __( 'Items shipped via %1$s on %2$s with tracking number %3$s (Shipstation).', 'woocommerce-shipstation' ),
320
  esc_html( $carrier ),
321
  date_i18n( get_option( 'date_format' ), $timestamp ),
322
  $tracking_number
323
  );
324
 
325
  /* translators: 1: order id */
326
- $this->log( sprintf( __( 'No items found - shipping entire order %d.', 'woocommerce-shipstation' ), $order_id ) );
327
  }
328
 
329
  // Tracking information - WC Shipment Tracking extension.
@@ -349,7 +347,7 @@ class WC_Shipstation_API_Shipnotify extends WC_Shipstation_API_Request {
349
  $order->update_status( WC_ShipStation_Integration::$shipped_status );
350
 
351
  /* translators: 1) order ID 2) shipment status */
352
- $this->log( sprintf( __( 'Updated order %1$s to status %2$s', 'woocommerce-shipstation' ), $order_id, WC_ShipStation_Integration::$shipped_status ) );
353
  }
354
 
355
  // Trigger action for other integrations.
183
 
184
  if ( empty( $shipstation_xml ) ) {
185
  $can_parse_xml = false;
186
+ $this->log( __( 'Missing ShipNotify XML input.', 'woocommerce-shipstation-integration' ) );
187
 
188
  $mask = array(
189
  'auth_key' => '***',
203
 
204
  if ( ! function_exists( 'simplexml_import_dom' ) ) {
205
  $can_parse_xml = false;
206
+ $this->log( __( 'Missing SimpleXML extension for parsing ShipStation XML.', 'woocommerce-shipstation-integration' ) );
207
  }
208
 
209
  // Try to parse XML first since it can contain the real OrderID.
210
  if ( $can_parse_xml ) {
211
+ $this->log( __( 'ShipNotify XML: ', 'woocommerce-shipstation-integration' ) . print_r( $shipstation_xml, true ) );
212
 
213
  $xml = $this->get_parsed_xml( $shipstation_xml );
214
 
215
  if ( ! $xml ) {
216
+ $this->log( __( 'Cannot parse XML', 'woocommerce-shipstation-integration' ) );
217
  status_header( 500 );
218
  }
219
 
234
 
235
  if ( false === $order || ! is_object( $order ) ) {
236
  /* translators: 1: order id */
237
+ $this->log( sprintf( __( 'Order %s can not be found.', 'woocommerce-shipstation-integration' ), $order_id ) );
 
238
  exit;
239
  }
240
 
242
  $order_id = version_compare( WC_VERSION, '3.0.0', '<' ) ? $order->id : $order->get_id();
243
  if ( empty( $order_id ) ) {
244
  /* translators: 1: order id */
245
+ $this->log( sprintf( __( 'Invalid order ID: %s', 'woocommerce-shipstation-integration' ), $order_id ) );
 
246
  exit;
247
  }
248
 
251
  $items = $xml->Items;
252
  if ( $items ) {
253
  foreach ( $items->Item as $item ) {
254
+ $this->log( __( 'ShipNotify Item: ', 'woocommerce-shipstation-integration' ) . print_r( $item, true ) );
255
 
256
  $item_sku = wc_clean( (string) $item->SKU );
257
  $item_name = wc_clean( (string) $item->Name );
264
  $item_id = wc_clean( (int) $item->LineItemID );
265
  if ( ! $this->is_shippable_item( $order, $item_id ) ) {
266
  /* translators: 1: item name */
267
+ $this->log( sprintf( __( 'Item %s is not shippable product. Skipping.', 'woocommerce-shipstation-integration' ), $item_name ) );
268
  continue;
269
  }
270
 
282
  if ( sizeof( $shipped_items ) > 0 ) {
283
  $order_note = sprintf(
284
  /* translators: 1) shipped items 2) carrier's name 3) shipped date, 4) tracking number */
285
+ __( '%1$s shipped via %2$s on %3$s with tracking number %4$s.', 'woocommerce-shipstation-integration' ),
286
  esc_html( implode( ', ', $shipped_items ) ),
287
  esc_html( $carrier ),
288
  date_i18n( get_option( 'date_format' ), $timestamp ),
298
  $this->log(
299
  sprintf(
300
  /* translators: 1) number of shipped items 2) total shipped items 3) order ID */
301
+ __( 'Shipped %1$d out of %2$d items in order %3$s', 'woocommerce-shipstation-integration' ),
302
  $shipped_item_count,
303
  $total_item_count,
304
  $order_id
314
 
315
  $order_note = sprintf(
316
  /* translators: 1) carrier's name 2) shipped date, 3) tracking number */
317
+ __( 'Items shipped via %1$s on %2$s with tracking number %3$s (Shipstation).', 'woocommerce-shipstation-integration' ),
318
  esc_html( $carrier ),
319
  date_i18n( get_option( 'date_format' ), $timestamp ),
320
  $tracking_number
321
  );
322
 
323
  /* translators: 1: order id */
324
+ $this->log( sprintf( __( 'No items found - shipping entire order %d.', 'woocommerce-shipstation-integration' ), $order_id ) );
325
  }
326
 
327
  // Tracking information - WC Shipment Tracking extension.
347
  $order->update_status( WC_ShipStation_Integration::$shipped_status );
348
 
349
  /* translators: 1) order ID 2) shipment status */
350
+ $this->log( sprintf( __( 'Updated order %1$s to status %2$s', 'woocommerce-shipstation-integration' ), $order_id, WC_ShipStation_Integration::$shipped_status ) );
351
  }
352
 
353
  // Trigger action for other integrations.
includes/class-wc-shipstation-api.php CHANGED
@@ -50,11 +50,11 @@ class WC_Shipstation_API extends WC_Shipstation_API_Request {
50
  */
51
  public function request() {
52
  if ( empty( $_GET['auth_key'] ) ) {
53
- $this->trigger_error( __( 'Authentication key is required!', 'woocommerce-shipstation' ) );
54
  }
55
 
56
  if ( ! hash_equals( sanitize_text_field( $_GET['auth_key'] ), WC_ShipStation_Integration::$auth_key ) ) {
57
- $this->trigger_error( __( 'Invalid authentication key', 'woocommerce-shipstation' ) );
58
  }
59
 
60
  $request = $_GET;
@@ -62,7 +62,7 @@ class WC_Shipstation_API extends WC_Shipstation_API_Request {
62
  if ( isset( $request['action'] ) ) {
63
  $this->request = array_map( 'sanitize_text_field', $request );
64
  } else {
65
- $this->trigger_error( __( 'Invalid request', 'woocommerce-shipstation' ) );
66
  }
67
 
68
  self::$authenticated = true;
@@ -75,11 +75,11 @@ class WC_Shipstation_API extends WC_Shipstation_API_Request {
75
  $obfuscated_request = $mask + $this->request;
76
 
77
  /* translators: 1: query string */
78
- $this->log( sprintf( __( 'Input params: %s', 'woocommerce-shipstation' ), http_build_query( $obfuscated_request ) ) );
79
  $request_class = include( 'api-requests/class-wc-shipstation-api-' . $this->request['action'] . '.php' );
80
  $request_class->request();
81
  } else {
82
- $this->trigger_error( __( 'Invalid request', 'woocommerce-shipstation' ) );
83
  }
84
 
85
  exit;
50
  */
51
  public function request() {
52
  if ( empty( $_GET['auth_key'] ) ) {
53
+ $this->trigger_error( __( 'Authentication key is required!', 'woocommerce-shipstation-integration' ) );
54
  }
55
 
56
  if ( ! hash_equals( sanitize_text_field( $_GET['auth_key'] ), WC_ShipStation_Integration::$auth_key ) ) {
57
+ $this->trigger_error( __( 'Invalid authentication key', 'woocommerce-shipstation-integration' ) );
58
  }
59
 
60
  $request = $_GET;
62
  if ( isset( $request['action'] ) ) {
63
  $this->request = array_map( 'sanitize_text_field', $request );
64
  } else {
65
+ $this->trigger_error( __( 'Invalid request', 'woocommerce-shipstation-integration' ) );
66
  }
67
 
68
  self::$authenticated = true;
75
  $obfuscated_request = $mask + $this->request;
76
 
77
  /* translators: 1: query string */
78
+ $this->log( sprintf( __( 'Input params: %s', 'woocommerce-shipstation-integration' ), http_build_query( $obfuscated_request ) ) );
79
  $request_class = include( 'api-requests/class-wc-shipstation-api-' . $this->request['action'] . '.php' );
80
  $request_class->request();
81
  } else {
82
+ $this->trigger_error( __( 'Invalid request', 'woocommerce-shipstation-integration' ) );
83
  }
84
 
85
  exit;
includes/class-wc-shipstation-integration.php CHANGED
@@ -19,8 +19,8 @@ class WC_ShipStation_Integration extends WC_Integration {
19
  */
20
  public function __construct() {
21
  $this->id = 'shipstation';
22
- $this->method_title = __( 'ShipStation', 'woocommerce-shipstation' );
23
- $this->method_description = __( 'ShipStation allows you to retrieve &amp; manage orders, then print labels &amp; packing slips with ease.', 'woocommerce-shipstation' );
24
 
25
  if ( ! get_option( 'woocommerce_shipstation_auth_key', false ) ) {
26
  update_option( 'woocommerce_shipstation_auth_key', $this->generate_key() );
@@ -111,11 +111,11 @@ class WC_ShipStation_Integration extends WC_Integration {
111
  public function hide_notices() {
112
  if ( isset( $_GET['wc-shipstation-hide-notice'] ) && isset( $_GET['_wc_shipstation_notice_nonce'] ) ) {
113
  if ( ! wp_verify_nonce( $_GET['_wc_shipstation_notice_nonce'], 'wc_shipstation_hide_notices_nonce' ) ) {
114
- wp_die( __( 'Action failed. Please refresh the page and retry.', 'woocommerce-shipstation' ) );
115
  }
116
 
117
  if ( ! current_user_can( 'manage_woocommerce' ) ) {
118
- wp_die( __( 'Cheatin&#8217; huh?', 'woocommerce-shipstation' ) );
119
  }
120
 
121
  update_option( 'wc_shipstation_hide_activate_notice', 'yes' );
@@ -130,7 +130,7 @@ class WC_ShipStation_Integration extends WC_Integration {
130
  return;
131
  }
132
 
133
- $logo_title = __( 'ShipStation logo', 'woocommerce-shipstation' );
134
  ?>
135
  <div class="notice notice-warning">
136
  <img class="shipstation-logo" alt="<?php echo esc_attr( $logo_title ); ?>" title="<?php echo esc_attr( $logo_title ); ?>" src="<?php echo plugins_url( 'assets/images/shipstation-logo-blue.png', dirname( __FILE__ ) ); ?>" />
@@ -140,7 +140,7 @@ class WC_ShipStation_Integration extends WC_Integration {
140
  printf(
141
  wp_kses(
142
  /* translators: %s: ShipStation URL */
143
- __( 'To begin printing shipping labels with ShipStation head over to <a class="shipstation-external-link" href="%s" target="_blank">ShipStation.com</a> and log in or create a new account.', 'woocommerce-shipstation' ),
144
  array(
145
  'a' => array(
146
  'class' => array(),
@@ -158,21 +158,21 @@ class WC_ShipStation_Integration extends WC_Integration {
158
  printf(
159
  wp_kses(
160
  /* translators: %s: ShipStation Auth Key */
161
- __( 'After logging in, add a selling channel for WooCommerce and use your Auth Key (<code>%s</code>) to connect your store.', 'woocommerce-shipstation' ),
162
  array( 'code' => array() )
163
  ),
164
  self::$auth_key
165
  );
166
  ?>
167
  </p>
168
- <p><?php esc_html_e( "Once connected you're good to go!", 'woocommerce-shipstation' ); ?></p>
169
  <hr>
170
  <p>
171
  <?php
172
  printf(
173
  wp_kses(
174
  /* translators: %1$s: ShipStation plugin settings URL, %2$s: ShipStation documentation URL */
175
- __( 'You can find other settings for this extension <a href="%1$s">here</a> and view the documentation <a href="%2$s">here</a>.', 'woocommerce-shipstation' ),
176
  array(
177
  'a' => array(
178
  'href' => array(),
19
  */
20
  public function __construct() {
21
  $this->id = 'shipstation';
22
+ $this->method_title = __( 'ShipStation', 'woocommerce-shipstation-integration' );
23
+ $this->method_description = __( 'ShipStation allows you to retrieve &amp; manage orders, then print labels &amp; packing slips with ease.', 'woocommerce-shipstation-integration' );
24
 
25
  if ( ! get_option( 'woocommerce_shipstation_auth_key', false ) ) {
26
  update_option( 'woocommerce_shipstation_auth_key', $this->generate_key() );
111
  public function hide_notices() {
112
  if ( isset( $_GET['wc-shipstation-hide-notice'] ) && isset( $_GET['_wc_shipstation_notice_nonce'] ) ) {
113
  if ( ! wp_verify_nonce( $_GET['_wc_shipstation_notice_nonce'], 'wc_shipstation_hide_notices_nonce' ) ) {
114
+ wp_die( __( 'Action failed. Please refresh the page and retry.', 'woocommerce-shipstation-integration' ) );
115
  }
116
 
117
  if ( ! current_user_can( 'manage_woocommerce' ) ) {
118
+ wp_die( __( 'Cheatin&#8217; huh?', 'woocommerce-shipstation-integration' ) );
119
  }
120
 
121
  update_option( 'wc_shipstation_hide_activate_notice', 'yes' );
130
  return;
131
  }
132
 
133
+ $logo_title = __( 'ShipStation logo', 'woocommerce-shipstation-integration' );
134
  ?>
135
  <div class="notice notice-warning">
136
  <img class="shipstation-logo" alt="<?php echo esc_attr( $logo_title ); ?>" title="<?php echo esc_attr( $logo_title ); ?>" src="<?php echo plugins_url( 'assets/images/shipstation-logo-blue.png', dirname( __FILE__ ) ); ?>" />
140
  printf(
141
  wp_kses(
142
  /* translators: %s: ShipStation URL */
143
+ __( 'To begin printing shipping labels with ShipStation head over to <a class="shipstation-external-link" href="%s" target="_blank">ShipStation.com</a> and log in or create a new account.', 'woocommerce-shipstation-integration' ),
144
  array(
145
  'a' => array(
146
  'class' => array(),
158
  printf(
159
  wp_kses(
160
  /* translators: %s: ShipStation Auth Key */
161
+ __( 'After logging in, add a selling channel for WooCommerce and use your Auth Key (<code>%s</code>) to connect your store.', 'woocommerce-shipstation-integration' ),
162
  array( 'code' => array() )
163
  ),
164
  self::$auth_key
165
  );
166
  ?>
167
  </p>
168
+ <p><?php esc_html_e( "Once connected you're good to go!", 'woocommerce-shipstation-integration' ); ?></p>
169
  <hr>
170
  <p>
171
  <?php
172
  printf(
173
  wp_kses(
174
  /* translators: %1$s: ShipStation plugin settings URL, %2$s: ShipStation documentation URL */
175
+ __( 'You can find other settings for this extension <a href="%1$s">here</a> and view the documentation <a href="%2$s">here</a>.', 'woocommerce-shipstation-integration' ),
176
  array(
177
  'a' => array(
178
  'href' => array(),
includes/class-wc-shipstation-privacy.php CHANGED
@@ -9,11 +9,11 @@ class WC_ShipStation_Privacy extends WC_Abstract_Privacy {
9
  *
10
  */
11
  public function __construct() {
12
- parent::__construct( __( 'ShipStation', 'woocommerce-shipstation' ) );
13
 
14
- $this->add_exporter( 'woocommerce-shipstation-order-data', __( 'WooCommerce ShipStation Order Data', 'woocommerce-shipstation' ), array( $this, 'order_data_exporter' ) );
15
 
16
- $this->add_eraser( 'woocommerce-shipstation-order-data', __( 'WooCommerce ShipStation Data', 'woocommerce-shipstation' ), array( $this, 'order_data_eraser' ) );
17
  }
18
 
19
  /**
@@ -47,7 +47,7 @@ class WC_ShipStation_Privacy extends WC_Abstract_Privacy {
47
  */
48
  public function get_privacy_message() {
49
  /* translators: 1: URL to documentation */
50
- return wpautop( sprintf( __( 'By using this extension, you may be storing personal data or sharing data with an external service. <a href="%s" target="_blank">Learn more about how this works, including what you may want to include in your privacy policy.</a>', 'woocommerce-shipstation' ), 'https://docs.woocommerce.com/document/privacy-shipping/#woocommerce-shipstation' ) );
51
  }
52
 
53
  /**
@@ -70,19 +70,19 @@ class WC_ShipStation_Privacy extends WC_Abstract_Privacy {
70
  foreach ( $orders as $order ) {
71
  $data_to_export[] = array(
72
  'group_id' => 'woocommerce_orders',
73
- 'group_label' => __( 'Orders', 'woocommerce-shipstation' ),
74
  'item_id' => 'order-' . $order->get_id(),
75
  'data' => array(
76
  array(
77
- 'name' => __( 'ShipStation tracking provider', 'woocommerce-shipstation' ),
78
  'value' => get_post_meta( $order->get_id(), '_tracking_provider', true ),
79
  ),
80
  array(
81
- 'name' => __( 'ShipStation tracking number', 'woocommerce-shipstation' ),
82
  'value' => get_post_meta( $order->get_id(), '_tracking_number', true ),
83
  ),
84
  array(
85
- 'name' => __( 'ShipStation date shipped', 'woocommerce-shipstation' ),
86
  'value' => get_post_meta( $order->get_id(), '_date_shipped', true ) ? date( 'Y-m-d H:i:s', get_post_meta( $order->get_id(), '_date_shipped', true ) ) : '',
87
  ),
88
  ),
@@ -158,7 +158,7 @@ class WC_ShipStation_Privacy extends WC_Abstract_Privacy {
158
  delete_post_meta( $order->get_id(), '_date_shipped' );
159
  delete_post_meta( $order->get_id(), '_shipstation_exported' );
160
 
161
- return array( true, false, array( __( 'ShipStation Order Data Erased.', 'woocommerce-shipstation' ) ) );
162
  }
163
  }
164
 
9
  *
10
  */
11
  public function __construct() {
12
+ parent::__construct( __( 'ShipStation', 'woocommerce-shipstation-integration' ) );
13
 
14
+ $this->add_exporter( 'woocommerce-shipstation-order-data', __( 'WooCommerce ShipStation Order Data', 'woocommerce-shipstation-integration' ), array( $this, 'order_data_exporter' ) );
15
 
16
+ $this->add_eraser( 'woocommerce-shipstation-order-data', __( 'WooCommerce ShipStation Data', 'woocommerce-shipstation-integration' ), array( $this, 'order_data_eraser' ) );
17
  }
18
 
19
  /**
47
  */
48
  public function get_privacy_message() {
49
  /* translators: 1: URL to documentation */
50
+ return wpautop( sprintf( __( 'By using this extension, you may be storing personal data or sharing data with an external service. <a href="%s" target="_blank">Learn more about how this works, including what you may want to include in your privacy policy.</a>', 'woocommerce-shipstation-integration' ), 'https://docs.woocommerce.com/document/privacy-shipping/#woocommerce-shipstation' ) );
51
  }
52
 
53
  /**
70
  foreach ( $orders as $order ) {
71
  $data_to_export[] = array(
72
  'group_id' => 'woocommerce_orders',
73
+ 'group_label' => __( 'Orders', 'woocommerce-shipstation-integration' ),
74
  'item_id' => 'order-' . $order->get_id(),
75
  'data' => array(
76
  array(
77
+ 'name' => __( 'ShipStation tracking provider', 'woocommerce-shipstation-integration' ),
78
  'value' => get_post_meta( $order->get_id(), '_tracking_provider', true ),
79
  ),
80
  array(
81
+ 'name' => __( 'ShipStation tracking number', 'woocommerce-shipstation-integration' ),
82
  'value' => get_post_meta( $order->get_id(), '_tracking_number', true ),
83
  ),
84
  array(
85
+ 'name' => __( 'ShipStation date shipped', 'woocommerce-shipstation-integration' ),
86
  'value' => get_post_meta( $order->get_id(), '_date_shipped', true ) ? date( 'Y-m-d H:i:s', get_post_meta( $order->get_id(), '_date_shipped', true ) ) : '',
87
  ),
88
  ),
158
  delete_post_meta( $order->get_id(), '_date_shipped' );
159
  delete_post_meta( $order->get_id(), '_shipstation_exported' );
160
 
161
+ return array( true, false, array( __( 'ShipStation Order Data Erased.', 'woocommerce-shipstation-integration' ) ) );
162
  }
163
  }
164
 
includes/data/data-settings.php CHANGED
@@ -29,41 +29,41 @@ foreach ( $statuses as $key => $value ) {
29
 
30
  $fields = array(
31
  'auth_key' => array(
32
- 'title' => __( 'Authentication Key', 'woocommerce-shipstation' ),
33
- 'description' => __( 'Copy and paste this key into ShipStation during setup.', 'woocommerce-shipstation' ),
34
  'default' => '',
35
  'type' => 'text',
36
- 'desc_tip' => __( 'This is the <code>Auth Key</code> you set in ShipStation and allows ShipStation to communicate with your store.', 'woocommerce-shipstation' ),
37
  'custom_attributes' => array(
38
  'readonly' => 'readonly',
39
  ),
40
  'value' => WC_ShipStation_Integration::$auth_key,
41
  ),
42
  'export_statuses' => array(
43
- 'title' => __( 'Export Order Statuses&hellip;', 'woocommerce-shipstation' ),
44
  'type' => 'multiselect',
45
  'options' => $statuses,
46
  'class' => 'chosen_select',
47
  'css' => 'width: 450px;',
48
- 'description' => __( 'Define the order statuses you wish to export to ShipStation.', 'woocommerce-shipstation' ),
49
  'desc_tip' => true,
50
  'custom_attributes' => array(
51
- 'data-placeholder' => __( 'Select Order Statuses', 'woocommerce-shipstation' ),
52
  ),
53
  ),
54
  'shipped_status' => array(
55
- 'title' => __( 'Shipped Order Status&hellip;', 'woocommerce-shipstation' ),
56
  'type' => 'select',
57
  'options' => $statuses,
58
- 'description' => __( 'Define the order status you wish to update to once an order has been shipping via ShipStation. By default this is "Completed".', 'woocommerce-shipstation' ),
59
  'desc_tip' => true,
60
  'default' => 'wc-completed',
61
  ),
62
  'logging_enabled' => array(
63
- 'title' => __( 'Logging', 'woocommerce-shipstation' ),
64
- 'label' => __( 'Enable Logging', 'woocommerce-shipstation' ),
65
  'type' => 'checkbox',
66
- 'description' => __( 'Note: this may log personal information. We recommend using this for debugging purposes only and deleting the logs when finished.', 'woocommerce-shipstation' ),
67
  'desc_tip' => 'Log all API interactions.',
68
  'default' => 'yes',
69
  ),
29
 
30
  $fields = array(
31
  'auth_key' => array(
32
+ 'title' => __( 'Authentication Key', 'woocommerce-shipstation-integration' ),
33
+ 'description' => __( 'Copy and paste this key into ShipStation during setup.', 'woocommerce-shipstation-integration' ),
34
  'default' => '',
35
  'type' => 'text',
36
+ 'desc_tip' => __( 'This is the <code>Auth Key</code> you set in ShipStation and allows ShipStation to communicate with your store.', 'woocommerce-shipstation-integration' ),
37
  'custom_attributes' => array(
38
  'readonly' => 'readonly',
39
  ),
40
  'value' => WC_ShipStation_Integration::$auth_key,
41
  ),
42
  'export_statuses' => array(
43
+ 'title' => __( 'Export Order Statuses&hellip;', 'woocommerce-shipstation-integration' ),
44
  'type' => 'multiselect',
45
  'options' => $statuses,
46
  'class' => 'chosen_select',
47
  'css' => 'width: 450px;',
48
+ 'description' => __( 'Define the order statuses you wish to export to ShipStation.', 'woocommerce-shipstation-integration' ),
49
  'desc_tip' => true,
50
  'custom_attributes' => array(
51
+ 'data-placeholder' => __( 'Select Order Statuses', 'woocommerce-shipstation-integration' ),
52
  ),
53
  ),
54
  'shipped_status' => array(
55
+ 'title' => __( 'Shipped Order Status&hellip;', 'woocommerce-shipstation-integration' ),
56
  'type' => 'select',
57
  'options' => $statuses,
58
+ 'description' => __( 'Define the order status you wish to update to once an order has been shipping via ShipStation. By default this is "Completed".', 'woocommerce-shipstation-integration' ),
59
  'desc_tip' => true,
60
  'default' => 'wc-completed',
61
  ),
62
  'logging_enabled' => array(
63
+ 'title' => __( 'Logging', 'woocommerce-shipstation-integration' ),
64
+ 'label' => __( 'Enable Logging', 'woocommerce-shipstation-integration' ),
65
  'type' => 'checkbox',
66
+ 'description' => __( 'Note: this may log personal information. We recommend using this for debugging purposes only and deleting the logs when finished.', 'woocommerce-shipstation-integration' ),
67
  'desc_tip' => 'Log all API interactions.',
68
  'default' => 'yes',
69
  ),
languages/woocommerce-shipstation.pot DELETED
@@ -1,290 +0,0 @@
1
- # Copyright (C) 2021 WooCommerce
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.1.43\n"
6
- "Report-Msgid-Bugs-To: "
7
- "https://wordpress.org/support/plugin/woocommerce-shipstation\n"
8
- "POT-Creation-Date: 2021-07-27 18:13:39+00:00\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=utf-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "PO-Revision-Date: 2021-MO-DA HO:MI+ZONE\n"
13
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
- "Language-Team: LANGUAGE <LL@li.org>\n"
15
- "X-Generator: node-wp-i18n 1.2.3\n"
16
-
17
- #: includes/api-requests/class-wc-shipstation-api-export.php:295
18
- msgid "Total Discount"
19
- msgstr ""
20
-
21
- #: includes/api-requests/class-wc-shipstation-api-export.php:310
22
- msgid "Order has been exported to Shipstation"
23
- msgstr ""
24
-
25
- #: includes/api-requests/class-wc-shipstation-api-export.php:321
26
- #. translators: 1: total count
27
- msgid "Exported %s orders"
28
- msgstr ""
29
-
30
- #: includes/api-requests/class-wc-shipstation-api-request.php:45
31
- #. translators: 1: field name
32
- msgid "Missing required param: %s"
33
- msgstr ""
34
-
35
- #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:186
36
- msgid "Missing ShipNotify XML input."
37
- msgstr ""
38
-
39
- #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:206
40
- msgid "Missing SimpleXML extension for parsing ShipStation XML."
41
- msgstr ""
42
-
43
- #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:211
44
- msgid "ShipNotify XML: "
45
- msgstr ""
46
-
47
- #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:216
48
- msgid "Cannot parse XML"
49
- msgstr ""
50
-
51
- #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:237
52
- #. translators: 1: order id
53
- msgid "Order %s can not be found."
54
- msgstr ""
55
-
56
- #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:246
57
- #. translators: 1: order id
58
- msgid "Invalid order ID: %s"
59
- msgstr ""
60
-
61
- #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:256
62
- msgid "ShipNotify Item: "
63
- msgstr ""
64
-
65
- #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:269
66
- #. translators: 1: item name
67
- msgid "Item %s is not shippable product. Skipping."
68
- msgstr ""
69
-
70
- #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:287
71
- #. translators: 1) shipped items 2) carrier's name 3) shipped date, 4) tracking
72
- #. number
73
- msgid "%1$s shipped via %2$s on %3$s with tracking number %4$s."
74
- msgstr ""
75
-
76
- #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:303
77
- #. translators: 1) number of shipped items 2) total shipped items 3) order ID
78
- msgid "Shipped %1$d out of %2$d items in order %3$s"
79
- msgstr ""
80
-
81
- #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:319
82
- #. translators: 1) carrier's name 2) shipped date, 3) tracking number
83
- msgid "Items shipped via %1$s on %2$s with tracking number %3$s (Shipstation)."
84
- msgstr ""
85
-
86
- #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:326
87
- #. translators: 1: order id
88
- msgid "No items found - shipping entire order %d."
89
- msgstr ""
90
-
91
- #: includes/api-requests/class-wc-shipstation-api-shipnotify.php:352
92
- #. translators: 1) order ID 2) shipment status
93
- msgid "Updated order %1$s to status %2$s"
94
- msgstr ""
95
-
96
- #: includes/class-wc-shipstation-api.php:53
97
- msgid "Authentication key is required!"
98
- msgstr ""
99
-
100
- #: includes/class-wc-shipstation-api.php:57
101
- msgid "Invalid authentication key"
102
- msgstr ""
103
-
104
- #: includes/class-wc-shipstation-api.php:65
105
- #: includes/class-wc-shipstation-api.php:82
106
- msgid "Invalid request"
107
- msgstr ""
108
-
109
- #: includes/class-wc-shipstation-api.php:78
110
- #. translators: 1: query string
111
- msgid "Input params: %s"
112
- msgstr ""
113
-
114
- #: includes/class-wc-shipstation-integration.php:22
115
- #: includes/class-wc-shipstation-privacy.php:12
116
- msgid "ShipStation"
117
- msgstr ""
118
-
119
- #: includes/class-wc-shipstation-integration.php:23
120
- msgid ""
121
- "ShipStation allows you to retrieve &amp; manage orders, then print labels "
122
- "&amp; packing slips with ease."
123
- msgstr ""
124
-
125
- #: includes/class-wc-shipstation-integration.php:114
126
- msgid "Action failed. Please refresh the page and retry."
127
- msgstr ""
128
-
129
- #: includes/class-wc-shipstation-integration.php:118
130
- msgid "Cheatin&#8217; huh?"
131
- msgstr ""
132
-
133
- #: includes/class-wc-shipstation-integration.php:133
134
- msgid "ShipStation logo"
135
- msgstr ""
136
-
137
- #: includes/class-wc-shipstation-integration.php:143
138
- #. translators: %s: ShipStation URL
139
- msgid ""
140
- "To begin printing shipping labels with ShipStation head over to <a "
141
- "class=\"shipstation-external-link\" href=\"%s\" "
142
- "target=\"_blank\">ShipStation.com</a> and log in or create a new account."
143
- msgstr ""
144
-
145
- #: includes/class-wc-shipstation-integration.php:161
146
- #. translators: %s: ShipStation Auth Key
147
- msgid ""
148
- "After logging in, add a selling channel for WooCommerce and use your Auth "
149
- "Key (<code>%s</code>) to connect your store."
150
- msgstr ""
151
-
152
- #: includes/class-wc-shipstation-integration.php:168
153
- msgid "Once connected you're good to go!"
154
- msgstr ""
155
-
156
- #: includes/class-wc-shipstation-integration.php:175
157
- #. translators: %1$s: ShipStation plugin settings URL, %2$s: ShipStation
158
- #. documentation URL
159
- msgid ""
160
- "You can find other settings for this extension <a href=\"%1$s\">here</a> "
161
- "and view the documentation <a href=\"%2$s\">here</a>."
162
- msgstr ""
163
-
164
- #: includes/class-wc-shipstation-privacy.php:14
165
- msgid "WooCommerce ShipStation Order Data"
166
- msgstr ""
167
-
168
- #: includes/class-wc-shipstation-privacy.php:16
169
- msgid "WooCommerce ShipStation Data"
170
- msgstr ""
171
-
172
- #: includes/class-wc-shipstation-privacy.php:50
173
- #. translators: 1: URL to documentation
174
- msgid ""
175
- "By using this extension, you may be storing personal data or sharing data "
176
- "with an external service. <a href=\"%s\" target=\"_blank\">Learn more about "
177
- "how this works, including what you may want to include in your privacy "
178
- "policy.</a>"
179
- msgstr ""
180
-
181
- #: includes/class-wc-shipstation-privacy.php:73
182
- msgid "Orders"
183
- msgstr ""
184
-
185
- #: includes/class-wc-shipstation-privacy.php:77
186
- msgid "ShipStation tracking provider"
187
- msgstr ""
188
-
189
- #: includes/class-wc-shipstation-privacy.php:81
190
- msgid "ShipStation tracking number"
191
- msgstr ""
192
-
193
- #: includes/class-wc-shipstation-privacy.php:85
194
- msgid "ShipStation date shipped"
195
- msgstr ""
196
-
197
- #: includes/class-wc-shipstation-privacy.php:161
198
- msgid "ShipStation Order Data Erased."
199
- msgstr ""
200
-
201
- #: includes/data/data-settings.php:32
202
- msgid "Authentication Key"
203
- msgstr ""
204
-
205
- #: includes/data/data-settings.php:33
206
- msgid "Copy and paste this key into ShipStation during setup."
207
- msgstr ""
208
-
209
- #: includes/data/data-settings.php:36
210
- msgid ""
211
- "This is the <code>Auth Key</code> you set in ShipStation and allows "
212
- "ShipStation to communicate with your store."
213
- msgstr ""
214
-
215
- #: includes/data/data-settings.php:43
216
- msgid "Export Order Statuses&hellip;"
217
- msgstr ""
218
-
219
- #: includes/data/data-settings.php:48
220
- msgid "Define the order statuses you wish to export to ShipStation."
221
- msgstr ""
222
-
223
- #: includes/data/data-settings.php:51
224
- msgid "Select Order Statuses"
225
- msgstr ""
226
-
227
- #: includes/data/data-settings.php:55
228
- msgid "Shipped Order Status&hellip;"
229
- msgstr ""
230
-
231
- #: includes/data/data-settings.php:58
232
- msgid ""
233
- "Define the order status you wish to update to once an order has been "
234
- "shipping via ShipStation. By default this is \"Completed\"."
235
- msgstr ""
236
-
237
- #: includes/data/data-settings.php:63
238
- msgid "Logging"
239
- msgstr ""
240
-
241
- #: includes/data/data-settings.php:64
242
- msgid "Enable Logging"
243
- msgstr ""
244
-
245
- #: includes/data/data-settings.php:66
246
- msgid ""
247
- "Note: this may log personal information. We recommend using this for "
248
- "debugging purposes only and deleting the logs when finished."
249
- msgstr ""
250
-
251
- #: woocommerce-shipstation.php:28
252
- #. translators: %s WC download URL link.
253
- msgid ""
254
- "Shipstation requires WooCommerce to be installed and active. You can "
255
- "download %s here."
256
- msgstr ""
257
-
258
- #: woocommerce-shipstation.php:97
259
- msgid "Settings"
260
- msgstr ""
261
-
262
- #: woocommerce-shipstation.php:98
263
- msgid "Support"
264
- msgstr ""
265
-
266
- #: woocommerce-shipstation.php:99
267
- msgid "Docs"
268
- msgstr ""
269
-
270
- #. Plugin Name of the plugin/theme
271
- msgid "WooCommerce - ShipStation Integration"
272
- msgstr ""
273
-
274
- #. Plugin URI of the plugin/theme
275
- msgid "https://woocommerce.com/products/shipstation-integration/"
276
- msgstr ""
277
-
278
- #. Description of the plugin/theme
279
- msgid ""
280
- "Adds ShipStation label printing support to WooCommerce. Requires server "
281
- "DomDocument support."
282
- msgstr ""
283
-
284
- #. Author of the plugin/theme
285
- msgid "WooCommerce"
286
- msgstr ""
287
-
288
- #. Author URI of the plugin/theme
289
- msgid "https://woocommerce.com/"
290
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: shipping, woocommerce, automattic
4
  Requires at least: 4.4
5
  Tested up to: 5.5
6
  Requires PHP: 5.6
7
- Stable tag: 4.1.43
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -46,6 +46,11 @@ If you get stuck, you can ask for help in the Plugin Forum.
46
 
47
  == Changelog ==
48
 
 
 
 
 
 
49
  = 4.1.43 - 2021-07-27 =
50
  * Fix - API returns status code 200 even when errors exist.
51
  * Tweak - Add version compare for deprecated Order::get_product_from_item().
@@ -68,7 +73,4 @@ If you get stuck, you can ask for help in the Plugin Forum.
68
  = 4.1.38 - 2020-08-19 =
69
  * Tweak - WordPress 5.5 compatibility.
70
 
71
- = 4.1.37 - 2020-06-05 =
72
- * Tweak - Dismiss activation notice independent of user.
73
-
74
  [See changelog for all versions](https://github.com/woocommerce/woocommerce-shipstation/raw/master/changelog.txt).
4
  Requires at least: 4.4
5
  Tested up to: 5.5
6
  Requires PHP: 5.6
7
+ Stable tag: 4.1.44
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
46
 
47
  == Changelog ==
48
 
49
+ = 4.1.44 - 2021-08-12 =
50
+ * Fix - Changing text domain to "woocommerce-shipstation-integration" to match with plugin slug.
51
+ * Fix - Order product quantities do not sync to Shipstation when using a refund.
52
+ * Fix - PHP notice error "wc_cog_order_total_cost" was called incorrectly.
53
+
54
  = 4.1.43 - 2021-07-27 =
55
  * Fix - API returns status code 200 even when errors exist.
56
  * Tweak - Add version compare for deprecated Order::get_product_from_item().
73
  = 4.1.38 - 2020-08-19 =
74
  * Tweak - WordPress 5.5 compatibility.
75
 
 
 
 
76
  [See changelog for all versions](https://github.com/woocommerce/woocommerce-shipstation/raw/master/changelog.txt).
woocommerce-shipstation.php CHANGED
@@ -2,11 +2,11 @@
2
  /**
3
  * Plugin Name: WooCommerce - ShipStation Integration
4
  * Plugin URI: https://woocommerce.com/products/shipstation-integration/
5
- * Version: 4.1.43
6
  * Description: Adds ShipStation label printing support to WooCommerce. Requires server DomDocument support.
7
  * Author: WooCommerce
8
  * Author URI: https://woocommerce.com/
9
- * Text Domain: woocommerce-shipstation
10
  * Domain Path: /languages
11
  * Tested up to: 5.5
12
  * WC tested up to: 4.5
@@ -25,7 +25,7 @@ if ( ! defined( 'ABSPATH' ) ) {
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
  /**
@@ -34,14 +34,14 @@ function woocommerce_shipstation_missing_wc_notice() {
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.43' ); // WRCS: DEFINED_VERSION.
45
  define( 'WC_SHIPSTATION_FILE', __FILE__ );
46
 
47
  if ( ! defined( 'WC_SHIPSTATION_EXPORT_LIMIT' ) ) {
@@ -94,9 +94,9 @@ add_action( 'woocommerce_api_wc_shipstation', 'woocommerce_shipstation_api' );
94
  function woocommerce_shipstation_api_plugin_action_links( $links ) {
95
  $setting_link = admin_url( 'admin.php?page=wc-settings&tab=integration&section=shipstation' );
96
  $plugin_links = array(
97
- '<a href="' . $setting_link . '">' . __( 'Settings', 'woocommerce-shipstation' ) . '</a>',
98
- '<a href="https://woocommerce.com/my-account/tickets">' . __( 'Support', 'woocommerce-shipstation' ) . '</a>',
99
- '<a href="https://docs.woocommerce.com/document/shipstation-for-woocommerce/">' . __( 'Docs', 'woocommerce-shipstation' ) . '</a>',
100
  );
101
 
102
  return array_merge( $plugin_links, $links );
2
  /**
3
  * Plugin Name: WooCommerce - ShipStation Integration
4
  * Plugin URI: https://woocommerce.com/products/shipstation-integration/
5
+ * Version: 4.1.44
6
  * Description: Adds ShipStation label printing support to WooCommerce. Requires server DomDocument support.
7
  * Author: WooCommerce
8
  * Author URI: https://woocommerce.com/
9
+ * Text Domain: woocommerce-shipstation-integration
10
  * Domain Path: /languages
11
  * Tested up to: 5.5
12
  * WC tested up to: 4.5
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-integration' ), '<a href="https://woocommerce.com/" target="_blank">WooCommerce</a>' ) . '</strong></p></div>';
29
  }
30
 
31
  /**
34
  * @since 1.0.0
35
  */
36
  function woocommerce_shipstation_init() {
37
+ load_plugin_textdomain( 'woocommerce-shipstation-integration', 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.44' ); // WRCS: DEFINED_VERSION.
45
  define( 'WC_SHIPSTATION_FILE', __FILE__ );
46
 
47
  if ( ! defined( 'WC_SHIPSTATION_EXPORT_LIMIT' ) ) {
94
  function woocommerce_shipstation_api_plugin_action_links( $links ) {
95
  $setting_link = admin_url( 'admin.php?page=wc-settings&tab=integration&section=shipstation' );
96
  $plugin_links = array(
97
+ '<a href="' . $setting_link . '">' . __( 'Settings', 'woocommerce-shipstation-integration' ) . '</a>',
98
+ '<a href="https://woocommerce.com/my-account/tickets">' . __( 'Support', 'woocommerce-shipstation-integration' ) . '</a>',
99
+ '<a href="https://docs.woocommerce.com/document/shipstation-for-woocommerce/">' . __( 'Docs', 'woocommerce-shipstation-integration' ) . '</a>',
100
  );
101
 
102
  return array_merge( $plugin_links, $links );