WooCommerce Square - Version 2.5.3

Version Description

  • 2021.07.23 =
  • Fix - Failed orders with error "Square Payment Failed (Status code VALUE_TOO_LOW)" caused by incorrect line item calculations on orders with discounts/coupons (introduced in 2.5.2). PR#635
Download this release

Release Info

Developer automattic
Plugin Icon 128x128 WooCommerce Square
Version 2.5.3
Comparing to
See all releases

Code changes from version 2.5.2 to 2.5.3

i18n/languages/woocommerce-square.pot CHANGED
@@ -2,10 +2,10 @@
2
  # This file is distributed under the GNU General Public License v3.0.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WooCommerce Square 2.5.2\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/woocommerce-square\n"
8
- "POT-Creation-Date: 2021-07-21 05:31:33+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
@@ -1852,15 +1852,15 @@ msgstr ""
1852
  msgid "Docs"
1853
  msgstr ""
1854
 
1855
- #: vendor/skyverge/wc-plugin-framework/woocommerce/class-sv-wc-plugin.php:623
1856
  msgid "%1$s - A minimum of %2$s is required."
1857
  msgstr ""
1858
 
1859
- #: vendor/skyverge/wc-plugin-framework/woocommerce/class-sv-wc-plugin.php:632
1860
  msgid "Set as %1$s - %2$s is required."
1861
  msgstr ""
1862
 
1863
- #: vendor/skyverge/wc-plugin-framework/woocommerce/class-sv-wc-plugin.php:855
1864
  msgid "Configure"
1865
  msgstr ""
1866
 
2
  # This file is distributed under the GNU General Public License v3.0.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WooCommerce Square 2.5.3\n"
6
  "Report-Msgid-Bugs-To: "
7
  "https://wordpress.org/support/plugin/woocommerce-square\n"
8
+ "POT-Creation-Date: 2021-07-23 04:28:29+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=utf-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
1852
  msgid "Docs"
1853
  msgstr ""
1854
 
1855
+ #: vendor/skyverge/wc-plugin-framework/woocommerce/class-sv-wc-plugin.php:621
1856
  msgid "%1$s - A minimum of %2$s is required."
1857
  msgstr ""
1858
 
1859
+ #: vendor/skyverge/wc-plugin-framework/woocommerce/class-sv-wc-plugin.php:630
1860
  msgid "Set as %1$s - %2$s is required."
1861
  msgstr ""
1862
 
1863
+ #: vendor/skyverge/wc-plugin-framework/woocommerce/class-sv-wc-plugin.php:853
1864
  msgid "Configure"
1865
  msgstr ""
1866
 
includes/Gateway/API/Requests/Orders.php CHANGED
@@ -193,7 +193,7 @@ class Orders extends API\Request {
193
  foreach ( $line_items as $item ) {
194
 
195
  $line_item = new SquareModel\OrderLineItem();
196
- $is_product = $item instanceof WC_Order_Item_Product;
197
 
198
  $line_item->setQuantity( $is_product ? (string) $item->get_quantity() : (string) 1 );
199
  $line_item->setBasePriceMoney( Money_Utility::amount_to_money( $is_product ? $order->get_item_subtotal( $item ) : $item->get_total(), $order->get_currency() ) );
193
  foreach ( $line_items as $item ) {
194
 
195
  $line_item = new SquareModel\OrderLineItem();
196
+ $is_product = $item instanceof \WC_Order_Item_Product;
197
 
198
  $line_item->setQuantity( $is_product ? (string) $item->get_quantity() : (string) 1 );
199
  $line_item->setBasePriceMoney( Money_Utility::amount_to_money( $is_product ? $order->get_item_subtotal( $item ) : $item->get_total(), $order->get_currency() ) );
includes/Plugin.php CHANGED
@@ -42,7 +42,7 @@ class Plugin extends Framework\SV_WC_Payment_Gateway_Plugin {
42
 
43
 
44
  /** plugin version number */
45
- const VERSION = '2.5.2';
46
 
47
  /** plugin ID */
48
  const PLUGIN_ID = 'square';
42
 
43
 
44
  /** plugin version number */
45
+ const VERSION = '2.5.3';
46
 
47
  /** plugin ID */
48
  const PLUGIN_ID = 'square';
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: credit card, square, woocommerce, inventory sync
4
  Requires at least: 4.6
5
  Tested up to: 5.7
6
  Requires PHP: 5.6
7
- Stable tag: 2.5.2
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -71,6 +71,9 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o
71
  2. The payment gateway settings.
72
 
73
  == Changelog ==
 
 
 
74
  = 2.5.2 - 2021.07.21 =
75
  * Fix - Product and inventory data not being synced due to duplicate/orphaned product metadata in database. PR#625
76
  * Fix - Bypass SSL verification when checking background job processing eligibility. PR#624
4
  Requires at least: 4.6
5
  Tested up to: 5.7
6
  Requires PHP: 5.6
7
+ Stable tag: 2.5.3
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
71
  2. The payment gateway settings.
72
 
73
  == Changelog ==
74
+ = 2.5.3 - 2021.07.23 =
75
+ * Fix - Failed orders with error "Square Payment Failed (Status code VALUE_TOO_LOW)" caused by incorrect line item calculations on orders with discounts/coupons (introduced in 2.5.2). PR#635
76
+
77
  = 2.5.2 - 2021.07.21 =
78
  * Fix - Product and inventory data not being synced due to duplicate/orphaned product metadata in database. PR#625
79
  * Fix - Bypass SSL verification when checking background job processing eligibility. PR#624
woocommerce-square.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: WooCommerce Square
4
- * Version: 2.5.2
5
  * Plugin URI: https://woocommerce.com/products/square/
6
  * Description: Adds ability to sync inventory between WooCommerce and Square POS. In addition, you can also make purchases through the Square payment gateway.
7
  * Author: WooCommerce
1
  <?php
2
  /**
3
  * Plugin Name: WooCommerce Square
4
+ * Version: 2.5.3
5
  * Plugin URI: https://woocommerce.com/products/square/
6
  * Description: Adds ability to sync inventory between WooCommerce and Square POS. In addition, you can also make purchases through the Square payment gateway.
7
  * Author: WooCommerce