From b49166de3f4af826981c9bc6ec3cace375e76de0 Mon Sep 17 00:00:00 2001 From: Marcus Dahl Date: Mon, 9 Dec 2024 16:25:42 +0100 Subject: [PATCH] fix: added two new hosts to `allowed_redirect_hosts`: `pay.mobilepay.dk` and `pay.mobilepay.fi`. This fixes a bug where customers were not able to switch to MobilePay --- README.txt | 5 ++++- includes/wc-gateway-vipps-recurring.php | 2 ++ woo-vipps-recurring.php | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.txt b/README.txt index 707971d..f6eac5b 100755 --- a/README.txt +++ b/README.txt @@ -3,7 +3,7 @@ Contributors: EverydayAS Tags: vipps, mobilepay, recurring payments, subscriptions, woocommerce subscriptions Requires at least: 5.0 Tested up to: 6.7 -Stable tag: 2.1.0 +Stable tag: 2.1.1 Requires PHP: 7.4 License: AGPLv3.0 or later License URI: https://www.gnu.org/licenses/agpl-3.0.html @@ -162,6 +162,9 @@ Alternatively you could look into using WooCommerce "Early renewals": [https://d == Changelog == += 2.1.1 = +* Fixed: Added two new hosts to `allowed_redirect_hosts`: `pay.mobilepay.dk` and `pay.mobilepay.fi`. This fixes a bug where customers were not able to switch to MobilePay. + = 2.1.0 = * Fixed: No longer throw an error when checking a Checkout payment where the subscription is now deleted. * Fixed: Properly handle in-app subscription cancelling. diff --git a/includes/wc-gateway-vipps-recurring.php b/includes/wc-gateway-vipps-recurring.php index 55753f9..ef07ac3 100755 --- a/includes/wc-gateway-vipps-recurring.php +++ b/includes/wc-gateway-vipps-recurring.php @@ -275,6 +275,8 @@ public function __construct() { add_filter( 'allowed_redirect_hosts', function ( $hosts ) { $hosts[] = 'api.vipps.no'; $hosts[] = 'apitest.vipps.no'; + $hosts[] = 'pay.mobilepay.dk'; + $hosts[] = 'pay.mobilepay.fi'; return $hosts; } ); diff --git a/woo-vipps-recurring.php b/woo-vipps-recurring.php index 0dcf6c9..a87d6c3 100755 --- a/woo-vipps-recurring.php +++ b/woo-vipps-recurring.php @@ -5,7 +5,7 @@ * Description: Offer recurring payments with Vipps MobilePay for WooCommerce Subscriptions * Author: Everyday AS * Author URI: https://everyday.no - * Version: 2.1.0 + * Version: 2.1.1 * Requires Plugins: woocommerce * Requires at least: 6.1 * Tested up to: 6.7 @@ -18,7 +18,7 @@ // phpcs:disable WordPress.Files.FileName -define( 'WC_VIPPS_RECURRING_VERSION', '2.1.0' ); +define( 'WC_VIPPS_RECURRING_VERSION', '2.1.1' ); /** * Polyfills