validate() публичный Метод

These fields are required by all eCheck payment tokens: last4 - string Last 4 digits of the check
С версии: 2.6.0
public validate ( ) : boolean
Результат boolean True if the passed data is valid
Пример #1
0
 /**
  * Test validation for empty/unset values.
  * @since 2.6.0
  */
 function test_wc_payment_token_echeck_validate_empty()
 {
     $token = new WC_Payment_Token_eCheck();
     $token->set_token(time() . ' ' . __FUNCTION__);
     $this->assertFalse($token->validate());
     $token->set_last4('1111');
     $this->assertTrue($token->validate());
 }