Rename class
This commit is contained in:
@@ -13,7 +13,7 @@ class Wiaas_Admin_Profile {
|
||||
|
||||
$phone = $_POST['phone'];
|
||||
|
||||
if (!Wiaas_Validation_Functions::is_phone($phone)){
|
||||
if (!Wiaas_Validation::is_phone($phone)){
|
||||
$errors->add('phone_error', __( '<strong>ERROR</strong>: Enter valid phone number.', 'crf' ));
|
||||
};
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ class Wiaas_REST_Customer_API {
|
||||
return wiaas_api_notice('ADD_PHONE_NUMBER', 'error', Wiaas_Customer::get_customer_info($customer_id));
|
||||
}
|
||||
|
||||
if (!Wiaas_Validation_Functions::is_phone($phone)){
|
||||
if (!Wiaas_Validation::is_phone($phone)){
|
||||
return wiaas_api_notice('INVALID_PHONE_NUMBER', 'error', Wiaas_Customer::get_customer_info($customer_id));
|
||||
};
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
/**
|
||||
* Class Wiaas_Validation_Functions
|
||||
* Class Wiaas_Validation
|
||||
*/
|
||||
class Wiaas_Validation_Functions {
|
||||
class Wiaas_Validation {
|
||||
|
||||
public static function is_phone($phone){
|
||||
return WC_Validation::is_phone($phone);
|
||||
@@ -59,7 +59,7 @@ include_once WIAAS_DIR . '/includes/class-wiass-templates.php';
|
||||
|
||||
include_once WIAAS_DIR . '/includes/wiaas-class-measurement-units.php';
|
||||
|
||||
include_once WIAAS_DIR . '/includes/class-wiaas-validation-functions.php';
|
||||
include_once WIAAS_DIR . '/includes/class-wiaas-validation.php';
|
||||
|
||||
function wiaas_redirect_to_login() {
|
||||
wp_safe_redirect(get_site_url('', 'wp-login.php'));
|
||||
|
||||
Reference in New Issue
Block a user