Skip to content

Commit e4785b7

Browse files
author
Alexander Zelenkov
committed
Убираем не цифры из телефона
1 parent 24613a8 commit e4785b7

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

unitpay/unitpay.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
Plugin Name: Unitpay
44
Description: Unitpay Plugin for WooCommerce
5-
Version: 1.0.1
5+
Version: 2.1.1
66
*/
77
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
88

@@ -130,7 +130,7 @@ public function generate_form($order_id){
130130
}
131131

132132
if ($order->billing_phone) {
133-
$form .= '<input type="hidden" name="customerPhone" value="' . $order->billing_phone . '" />';
133+
$form .= '<input type="hidden" name="customerPhone" value="' . preg_replace('/\D/', '', $order->billing_phone) . '" />';
134134
}
135135

136136
$form .=
@@ -180,7 +180,6 @@ function callback(){
180180
$status_sign = false;
181181
}
182182

183-
// $status_sign = true;
184183

185184
if ($status_sign){
186185
switch ($method) {

0 commit comments

Comments
 (0)