Hey, I added a custom code to my functions.php and I can't find it on string translation.
I saw a thread that had the same issue and I tried to edit the code as suggested but it doesn't work well as it crashed my site.
This is the code:
add_action('woocommerce_checkout_process', 'wpsh_validate_phone');
function wpsh_validate_phone() {
if (isset($_POST['billing_phone'])) {
$phone = strlen(preg_replace('/[^0-9]/', '', $_POST['billing_phone']));
if ($phone < 6) {
wc_add_notice( __( 'Billing Phone must be at least 6 digits long.' ), 'error' );
}
}
}
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.