Skip to content

Commit

Permalink
Update version to 7.5.4-beta
Browse files Browse the repository at this point in the history
merge 7.5.3 into this one
  • Loading branch information
mmaymo committed May 27, 2024
1 parent 3b997c6 commit 2403477
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mollie-payments-for-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Mollie Payments for WooCommerce
* Plugin URI: https://www.mollie.com
* Description: Accept payments in WooCommerce with the official Mollie plugin
* Version: 7.5.3
* Version: 7.5.4-beta
* Author: Mollie
* Author URI: https://www.mollie.com
* Requires at least: 5.0
Expand Down
9 changes: 7 additions & 2 deletions src/Payment/MollieObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -1072,9 +1072,14 @@ protected function getFormatedPhoneNumber(string $phone)
{
//remove whitespaces and all non numerical characters except +
$phone = preg_replace('/[^0-9+]+/', '', $phone);
if (!is_string($phone)) {
return null;
}
//check if phone starts with 06 and replace with +316
$phone = transformPhoneToNLFormat($phone);

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

0 comments on commit 2403477

Please sign in to comment.