Skip to content

Commit 2403477

Browse files
committed
Update version to 7.5.4-beta
merge 7.5.3 into this one
1 parent 3b997c6 commit 2403477

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

mollie-payments-for-woocommerce.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Mollie Payments for WooCommerce
44
* Plugin URI: https://www.mollie.com
55
* Description: Accept payments in WooCommerce with the official Mollie plugin
6-
* Version: 7.5.3
6+
* Version: 7.5.4-beta
77
* Author: Mollie
88
* Author URI: https://www.mollie.com
99
* Requires at least: 5.0

src/Payment/MollieObject.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,9 +1072,14 @@ protected function getFormatedPhoneNumber(string $phone)
10721072
{
10731073
//remove whitespaces and all non numerical characters except +
10741074
$phone = preg_replace('/[^0-9+]+/', '', $phone);
1075+
if (!is_string($phone)) {
1076+
return null;
1077+
}
1078+
//check if phone starts with 06 and replace with +316
1079+
$phone = transformPhoneToNLFormat($phone);
10751080

1076-
//check that $phone is in E164 format
1077-
if ($phone !== null && preg_match('/^\+[1-9]\d{1,14}$/', $phone)) {
1081+
//check that $phone is in E164 format or can be changed by api
1082+
if (preg_match('/^\+[1-9]\d{10,13}$|^[1-9]\d{9,13}$/', $phone)) {
10781083
return $phone;
10791084
}
10801085
return null;

0 commit comments

Comments
 (0)