Mollie Payments for WooCommerce - Version 5.1.5

Version Description

  • 22-03-2019 =

  • Fix - Refunds: Fix condition for extended (order line) refunds

  • Fix - WPML compatibility: Use get_home_url() to solve issues where people have different URLs for admin/site

Download this release

Release Info

Developer davdebcom
Plugin Icon wp plugin Mollie Payments for WooCommerce
Version 5.1.5
Comparing to
See all releases

Code changes from version 5.1.4 to 5.1.5

includes/mollie/wc/gateway/abstract.php CHANGED
@@ -1721,7 +1721,7 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
1721
  */
1722
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
1723
 
1724
- $site_url = get_site_url();
1725
  $polylang_fallback = false;
1726
 
1727
  if ( is_plugin_active( 'polylang/polylang.php' ) || is_plugin_active( 'polylang-pro/polylang.php' ) ) {
1721
  */
1722
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
1723
 
1724
+ $site_url = get_home_url();
1725
  $polylang_fallback = false;
1726
 
1727
  if ( is_plugin_active( 'polylang/polylang.php' ) || is_plugin_active( 'polylang-pro/polylang.php' ) ) {
includes/mollie/wc/payment/order.php CHANGED
@@ -857,22 +857,10 @@ class Mollie_WC_Payment_Order extends Mollie_WC_Payment_Object {
857
  // Calculate the total refund amount for one order line
858
  $line_total_refund_amount = abs( $item->get_quantity() ) * $line->unitPrice->value;
859
 
860
- // Mollie doesn't allow a partial refund of the full amount of at least one order line, so when merchants try that, warn them and block the process
861
- if ( number_format($line_total_refund_amount, 2 ) != number_format($item_refund_amount, 2 ) ) {
862
 
863
- $note_message = sprintf( "Mollie doesn't allow a partial refund of the full amount of at least one order line. Use 'Refund amount' instead. The WooCommerce order item ID is %s, Mollie order line ID is %s.",
864
- $original_order_item_id,
865
- $line->id
866
- );
867
-
868
- Mollie_WC_Plugin::debug( __METHOD__ . " - Order $order_id: " . $note_message );
869
- throw new Exception ( $note_message );
870
- }
871
-
872
- // Mollie doesn't allow a partial refund of less than one quantity, so when merchants try that, warn them and block the process
873
- if ( abs($item->get_quantity()) < 1 || ( $item_refund_amount == $line->unitPrice->value ) ) {
874
-
875
- $note_message = sprintf( "Mollie doesn't allow a partial refund of less than one quantity per order line. Use 'Refund amount' instead. The WooCommerce order item ID is %s, Mollie order line ID is %s.",
876
  $original_order_item_id,
877
  $line->id
878
  );
857
  // Calculate the total refund amount for one order line
858
  $line_total_refund_amount = abs( $item->get_quantity() ) * $line->unitPrice->value;
859
 
860
+ // Mollie doesn't allow a partial refund of the full amount or quantity of at least one order line, so when merchants try that, warn them and block the process
861
+ if ( (number_format($line_total_refund_amount, 2 ) != number_format($item_refund_amount, 2 )) || ( abs($item->get_quantity()) < 1 ) ) {
862
 
863
+ $note_message = sprintf( "Mollie doesn't allow a partial refund of the full amount or quantity of at least one order line. Use 'Refund amount' instead. The WooCommerce order item ID is %s, Mollie order line ID is %s.",
 
 
 
 
 
 
 
 
 
 
 
 
864
  $original_order_item_id,
865
  $line->id
866
  );
includes/mollie/wc/plugin.php CHANGED
@@ -7,7 +7,7 @@ class Mollie_WC_Plugin
7
  {
8
  const PLUGIN_ID = 'mollie-payments-for-woocommerce';
9
  const PLUGIN_TITLE = 'Mollie Payments for WooCommerce';
10
- const PLUGIN_VERSION = '5.1.4';
11
 
12
  const DB_VERSION = '1.0';
13
  const DB_VERSION_PARAM_NAME = 'mollie-db-version';
7
  {
8
  const PLUGIN_ID = 'mollie-payments-for-woocommerce';
9
  const PLUGIN_TITLE = 'Mollie Payments for WooCommerce';
10
+ const PLUGIN_VERSION = '5.1.5';
11
 
12
  const DB_VERSION = '1.0';
13
  const DB_VERSION_PARAM_NAME = 'mollie-db-version';
mollie-payments-for-woocommerce.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Mollie Payments for WooCommerce
4
  * Plugin URI: https://www.mollie.com
5
  * Description: Accept payments in WooCommerce with the official Mollie plugin
6
- * Version: 5.1.4
7
  * Author: Mollie
8
  * Author URI: https://www.mollie.com
9
  * Requires at least: 3.8
@@ -12,7 +12,7 @@
12
  * Domain Path: /i18n/languages/
13
  * License: GPLv2 or later
14
  * WC requires at least: 2.2.0
15
- * WC tested up to: 3.6
16
  */
17
 
18
  // Exit if accessed directly.
3
  * Plugin Name: Mollie Payments for WooCommerce
4
  * Plugin URI: https://www.mollie.com
5
  * Description: Accept payments in WooCommerce with the official Mollie plugin
6
+ * Version: 5.1.5
7
  * Author: Mollie
8
  * Author URI: https://www.mollie.com
9
  * Requires at least: 3.8
12
  * Domain Path: /i18n/languages/
13
  * License: GPLv2 or later
14
  * WC requires at least: 2.2.0
15
+ * WC tested up to: 3.5
16
  */
17
 
18
  // Exit if accessed directly.
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: daanvm, davdebcom, l.vangunst, ndijkstra, robin-mollie
3
  Tags: mollie, payments, payment gateway, woocommerce, credit card
4
  Requires at least: 3.8
5
  Tested up to: 5.1
6
- Stable tag: 5.1.4
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -181,6 +181,11 @@ Automatic updates should work like a charm; as always though, ensure you backup
181
 
182
  == Changelog ==
183
 
 
 
 
 
 
184
  = 5.1.4 - 21-03-2019 =
185
 
186
  * Fix - Fix caching issues for methods check
3
  Tags: mollie, payments, payment gateway, woocommerce, credit card
4
  Requires at least: 3.8
5
  Tested up to: 5.1
6
+ Stable tag: 5.1.5
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
181
 
182
  == Changelog ==
183
 
184
+ = 5.1.5 - 22-03-2019 =
185
+
186
+ * Fix - Refunds: Fix condition for extended (order line) refunds
187
+ * Fix - WPML compatibility: Use get_home_url() to solve issues where people have different URLs for admin/site
188
+
189
  = 5.1.4 - 21-03-2019 =
190
 
191
  * Fix - Fix caching issues for methods check