Mollie Payments for WooCommerce - Version 3.0.1

Version Description

  • 17/04/2018 =

  • Fix/Revert, see issue 173 - Improve support for Polylang option "Hide URL language information for default language" in webhook and return URLs

Download this release

Release Info

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

Code changes from version 3.0.0 to 3.0.1

includes/mollie/wc/gateway/abstract.php CHANGED
@@ -1477,39 +1477,38 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
1477
  return $url;
1478
  }
1479
 
1480
- /**
1481
- * Check if any multi language plugins are enabled and return the correct site url.
1482
- *
1483
- * @return string
1484
- */
1485
- protected function getSiteUrlWithLanguage() {
1486
- /**
1487
- * function is_plugin_active() is not available. Lets include it to use it.
1488
- */
1489
- include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
1490
-
1491
- $site_url = get_site_url();
1492
-
1493
- if ( is_plugin_active( 'polylang/polylang.php' ) || is_plugin_active( 'polylang-pro/polylang-pro.php' ) ) {
1494
-
1495
- $lang = PLL()->model->get_language( pll_current_language() );
1496
- $polylang_url = $lang->search_url;
1497
- $site_url = str_replace( $site_url, $polylang_url, $site_url );
1498
-
1499
- } else if ( is_plugin_active( 'mlang/mlang.php' ) || is_plugin_active( 'mlanguage/mlanguage.php' ) ) {
1500
 
1501
- $slug = get_bloginfo( 'language' );
1502
- $pos = strpos( $slug, '-' );
1503
- if ( $pos !== false ) {
1504
- $slug = substr( $slug, 0, $pos );
1505
- }
1506
- $slug = '/' . $slug;
1507
- $site_url = str_replace( $site_url, $site_url . $slug, $site_url );
1508
 
1509
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
1510
 
1511
- return $site_url;
1512
- }
1513
 
1514
  /**
1515
  * @return string|NULL
1477
  return $url;
1478
  }
1479
 
1480
+ /**
1481
+ * Check if any multi language plugins are enabled and return the correct site url.
1482
+ *
1483
+ * @return string
1484
+ */
1485
+ protected function getSiteUrlWithLanguage()
1486
+ {
1487
+ /**
1488
+ * function is_plugin_active() is not available. Lets include it to use it.
1489
+ */
1490
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
 
 
 
 
 
 
 
 
 
1491
 
1492
+ $site_url = get_site_url();
1493
+ $slug = ''; // default is NO slug/language
 
 
 
 
 
1494
 
1495
+ if (is_plugin_active('polylang/polylang.php')
1496
+ || is_plugin_active('polylang-pro/polylang-pro.php')
1497
+ || is_plugin_active('mlang/mlang.php')
1498
+ || is_plugin_active('mlanguage/mlanguage.php')
1499
+ )
1500
+ {
1501
+ // we probably have a multilang site. Retrieve current language.
1502
+ $slug = get_bloginfo('language');
1503
+ $pos = strpos($slug, '-');
1504
+ if ($pos !== false)
1505
+ $slug = substr($slug, 0, $pos);
1506
+
1507
+ $slug = '/' . $slug;
1508
+ }
1509
 
1510
+ return str_replace($site_url, $site_url . $slug, $site_url);
1511
+ }
1512
 
1513
  /**
1514
  * @return string|NULL
includes/mollie/wc/gateway/abstractsubscription.php CHANGED
@@ -309,6 +309,7 @@ abstract class Mollie_WC_Gateway_AbstractSubscription extends Mollie_WC_Gateway_
309
 
310
  $methods_needing_update = array (
311
  'mollie_wc_gateway_ideal',
 
312
  'mollie_wc_gateway_mistercash',
313
  'mollie_wc_gateway_bancontact',
314
  'mollie_wc_gateway_sofort',
309
 
310
  $methods_needing_update = array (
311
  'mollie_wc_gateway_ideal',
312
+ 'mollie_wc_gateway_inghomepay',
313
  'mollie_wc_gateway_mistercash',
314
  'mollie_wc_gateway_bancontact',
315
  'mollie_wc_gateway_sofort',
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 = '3.0.0';
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 = '3.0.1';
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: 3.0.0
7
  * Author: Mollie
8
  * Author URI: https://www.mollie.com
9
  * Requires at least: 3.8
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: 3.0.1
7
  * Author: Mollie
8
  * Author URI: https://www.mollie.com
9
  * Requires at least: 3.8
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: mollie, payments, woocommerce, payment gateway, e-commerce, credit card, i
4
  Requires at least: 3.8
5
  Tested up to: 4.9
6
  Requires PHP: 5.3
7
- Stable tag: 3.0.0
8
  Requires PHP: 5.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -164,6 +164,10 @@ Automatic updates should work like a charm; as always though, ensure you backup
164
 
165
  == Changelog ==
166
 
 
 
 
 
167
  = 3.0.0 - 17/04/2018 =
168
 
169
  * New - WooCommerce Subscriptions: add support for 'subscription_payment_method_change', shop-customers can change payment method if renewal payment fails (SEPA incasso, credit card)
@@ -172,7 +176,7 @@ Automatic updates should work like a charm; as always though, ensure you backup
172
  * New - WooCommerce Subscriptions: set renewal orders and subscriptions to 'On-Hold' if renewal payment fails
173
 
174
  * Fix - Fallback for getUserMollieCustomerId, get Mollie Customer ID from recent subscription if it's empty in WordPress user meta
175
- * Fix - Improve support for Polylang option "Hide URL language information for default language" in webhook and return URLs,
176
  * Fix - Only check if customer ID is valid on current API key if there is a customer ID (not empty)(and improve log messages)
177
  * Fix - Make sure payment instructions (Bank Transfer) are styled the same as WooCommerce content (Order received, payment pending)
178
  * Fix - Don't update/process/expire Mollie payments on WooCommerce orders that have been paid with other payment gateways
4
  Requires at least: 3.8
5
  Tested up to: 4.9
6
  Requires PHP: 5.3
7
+ Stable tag: 3.0.1
8
  Requires PHP: 5.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
164
 
165
  == Changelog ==
166
 
167
+ = 3.0.1 - 17/04/2018 =
168
+
169
+ * [Fix/Revert, see issue 173](https://github.com/mollie/WooCommerce/issues/173) - Improve support for Polylang option "Hide URL language information for default language" in webhook and return URLs
170
+
171
  = 3.0.0 - 17/04/2018 =
172
 
173
  * New - WooCommerce Subscriptions: add support for 'subscription_payment_method_change', shop-customers can change payment method if renewal payment fails (SEPA incasso, credit card)
176
  * New - WooCommerce Subscriptions: set renewal orders and subscriptions to 'On-Hold' if renewal payment fails
177
 
178
  * Fix - Fallback for getUserMollieCustomerId, get Mollie Customer ID from recent subscription if it's empty in WordPress user meta
179
+ * Fix - Improve support for Polylang option "Hide URL language information for default language" in webhook and return URLs
180
  * Fix - Only check if customer ID is valid on current API key if there is a customer ID (not empty)(and improve log messages)
181
  * Fix - Make sure payment instructions (Bank Transfer) are styled the same as WooCommerce content (Order received, payment pending)
182
  * Fix - Don't update/process/expire Mollie payments on WooCommerce orders that have been paid with other payment gateways