diff --git a/ajax.php b/ajax.php index 1f40b89bf5a88cbc26ac54486f3d20d31af702c4..d9bb8ad5338fa77c978fbf0dc1cedc705e1ba118 100644 --- a/ajax.php +++ b/ajax.php @@ -64,15 +64,9 @@ function validate_checkout() { $checkoutData = $_POST["checkoutData"]; if (empty($checkoutData[ 'company' ])) { - my_woocommerce_add_error( 'Please write company.'); - echo json_encode(array( - 'result' => 'success', - 'data' => 'company empty' - )); - return; + wc_add_notice( 'Please select your preferred contact method.', 'error' ); } - echo json_encode(array( 'result' => 'success', 'data' => $checkoutData