Version Description
24-07-2019 =
Fix - Payment wall won't load because third party code may register gateways in form of a class instance instead of a string
Download this release
Release Info
| Developer | wido |
| Plugin | |
| Version | 5.2.1 |
| Comparing to | |
| See all releases | |
Code changes from version 5.2.0 to 5.2.1
- includes/mollie/wc/plugin.php +16 -5
- mollie-payments-for-woocommerce.php +1 -1
- readme.txt +5 -1
includes/mollie/wc/plugin.php
CHANGED
|
@@ -7,12 +7,15 @@ 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.2.
|
| 11 |
|
| 12 |
const DB_VERSION = '1.0';
|
| 13 |
const DB_VERSION_PARAM_NAME = 'mollie-db-version';
|
| 14 |
const PENDING_PAYMENT_DB_TABLE_NAME = 'mollie_pending_payment';
|
| 15 |
|
|
|
|
|
|
|
|
|
|
| 16 |
/**
|
| 17 |
* @var bool
|
| 18 |
*/
|
|
@@ -377,6 +380,8 @@ class Mollie_WC_Plugin
|
|
| 377 |
*/
|
| 378 |
public static function addGateways( array $gateways ) {
|
| 379 |
|
|
|
|
|
|
|
| 380 |
// Return if function get_current_screen() is not defined
|
| 381 |
if ( ! function_exists( 'get_current_screen' ) ) {
|
| 382 |
return $gateways;
|
|
@@ -420,16 +425,22 @@ class Mollie_WC_Plugin
|
|
| 420 |
*/
|
| 421 |
public static function maybeDisableApplePayGateway(array $gateways)
|
| 422 |
{
|
| 423 |
-
$
|
| 424 |
-
|
|
|
|
|
|
|
|
|
|
| 425 |
|
| 426 |
if (!$postData) {
|
| 427 |
return $gateways;
|
| 428 |
}
|
| 429 |
|
| 430 |
parse_str($postData, $postData);
|
| 431 |
-
if (isset($postData[
|
| 432 |
-
$
|
|
|
|
|
|
|
|
|
|
| 433 |
}
|
| 434 |
|
| 435 |
return $gateways;
|
| 7 |
{
|
| 8 |
const PLUGIN_ID = 'mollie-payments-for-woocommerce';
|
| 9 |
const PLUGIN_TITLE = 'Mollie Payments for WooCommerce';
|
| 10 |
+
const PLUGIN_VERSION = '5.2.1';
|
| 11 |
|
| 12 |
const DB_VERSION = '1.0';
|
| 13 |
const DB_VERSION_PARAM_NAME = 'mollie-db-version';
|
| 14 |
const PENDING_PAYMENT_DB_TABLE_NAME = 'mollie_pending_payment';
|
| 15 |
|
| 16 |
+
const POST_DATA_KEY = 'post_data';
|
| 17 |
+
const POST_APPLE_PAY_METHOD_NOT_ALLOWED_KEY = 'mollie_apple_pay_method_not_allowed';
|
| 18 |
+
|
| 19 |
/**
|
| 20 |
* @var bool
|
| 21 |
*/
|
| 380 |
*/
|
| 381 |
public static function addGateways( array $gateways ) {
|
| 382 |
|
| 383 |
+
$gateways = array_merge($gateways, self::$GATEWAYS);
|
| 384 |
+
|
| 385 |
// Return if function get_current_screen() is not defined
|
| 386 |
if ( ! function_exists( 'get_current_screen' ) ) {
|
| 387 |
return $gateways;
|
| 425 |
*/
|
| 426 |
public static function maybeDisableApplePayGateway(array $gateways)
|
| 427 |
{
|
| 428 |
+
$postData = (string)filter_input(
|
| 429 |
+
INPUT_POST,
|
| 430 |
+
self::POST_DATA_KEY,
|
| 431 |
+
FILTER_SANITIZE_STRING
|
| 432 |
+
) ?: '';
|
| 433 |
|
| 434 |
if (!$postData) {
|
| 435 |
return $gateways;
|
| 436 |
}
|
| 437 |
|
| 438 |
parse_str($postData, $postData);
|
| 439 |
+
if (isset($postData[self::POST_APPLE_PAY_METHOD_NOT_ALLOWED_KEY]) && !is_admin()) {
|
| 440 |
+
$index = array_search('Mollie_WC_Gateway_Applepay', $gateways, true);
|
| 441 |
+
if ($index !== false) {
|
| 442 |
+
unset($gateways[$index]);
|
| 443 |
+
}
|
| 444 |
}
|
| 445 |
|
| 446 |
return $gateways;
|
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.2.
|
| 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: 5.2.1
|
| 7 |
* Author: Mollie
|
| 8 |
* Author URI: https://www.mollie.com
|
| 9 |
* Requires at least: 3.8
|
readme.txt
CHANGED
|
@@ -3,7 +3,7 @@ Contributors: daanvm, danielhuesken, davdebcom, dinamiko, inpsyde, l.vangunst, n
|
|
| 3 |
Tags: mollie, payments, payment gateway, woocommerce, credit card, ideal, bancontact, klarna, sofort, giropay, woocommerce subscriptions
|
| 4 |
Requires at least: 3.8
|
| 5 |
Tested up to: 5.2
|
| 6 |
-
Stable tag: 5.2.
|
| 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,10 @@ Automatic updates should work like a charm; as always though, ensure you backup
|
|
| 181 |
|
| 182 |
== Changelog ==
|
| 183 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 184 |
= 5.2.0 - 23-07-2019 =
|
| 185 |
|
| 186 |
* Fix - Missing browser language detect in payment settings
|
| 3 |
Tags: mollie, payments, payment gateway, woocommerce, credit card, ideal, bancontact, klarna, sofort, giropay, woocommerce subscriptions
|
| 4 |
Requires at least: 3.8
|
| 5 |
Tested up to: 5.2
|
| 6 |
+
Stable tag: 5.2.1
|
| 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.2.1 - 24-07-2019 =
|
| 185 |
+
|
| 186 |
+
* Fix - Payment wall won't load because third party code may register gateways in form of a class instance instead of a string
|
| 187 |
+
|
| 188 |
= 5.2.0 - 23-07-2019 =
|
| 189 |
|
| 190 |
* Fix - Missing browser language detect in payment settings
|
