Skip to content

Commit

Permalink
Убираем не цифры из телефона
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Zelenkov committed Oct 2, 2020
1 parent 24613a8 commit e4785b7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions unitpay/unitpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
Plugin Name: Unitpay
Description: Unitpay Plugin for WooCommerce
Version: 1.0.1
Version: 2.1.1
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

Expand Down Expand Up @@ -130,7 +130,7 @@ public function generate_form($order_id){
}

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

$form .=
Expand Down Expand Up @@ -180,7 +180,6 @@ function callback(){
$status_sign = false;
}

// $status_sign = true;

if ($status_sign){
switch ($method) {
Expand Down

0 comments on commit e4785b7

Please sign in to comment.