WC_Payment_Token_CC::validate
Validate credit card payment tokens.
These fields are required by all credit card payment tokens: expiry_month - string Expiration date (MM) for the card expiry_year - string Expiration date (YYYY) for the card last4 - string Last 4 digits of the card card_type - string Card type (visa, mastercard, etc)
Метод класса: WC_Payment_Token_CC{}
Хуков нет.
Возвращает
boolean. True if the passed data is valid
Использование
$WC_Payment_Token_CC = new WC_Payment_Token_CC(); $WC_Payment_Token_CC->validate();
Список изменений
| С версии 2.6.0 | Введена. |
Код WC_Payment_Token_CC::validate() WC Payment Token CC::validate WC 11.3.0
public function validate() {
$invalid_fields = $this->get_invalid_token_fields();
if ( array() !== $invalid_fields ) {
return false;
}
return true;
}