mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Ensure birth date is not empty
This commit is contained in:
parent
67ff582511
commit
70189f1928
1 changed files with 1 additions and 1 deletions
|
@ -342,7 +342,7 @@ class PayUponInvoice {
|
|||
}
|
||||
|
||||
$birth_date = filter_input( INPUT_POST, 'billing_birth_date', FILTER_SANITIZE_STRING );
|
||||
if ( $birth_date && ! $this->pui_helper->validate_birth_date( $birth_date ) ) {
|
||||
if ( ( $birth_date && ! $this->pui_helper->validate_birth_date( $birth_date ) ) || $birth_date === '' ) {
|
||||
$errors->add( 'validation', __( 'Invalid birth date.', 'woocommerce-paypal-payments' ) );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue