WordPress at Your Fingertips
function is not described

WC_Payment_Token_ECheck::validate() public WC 2.6.0

Validate eCheck payment tokens.

These fields are required by all eCheck payment tokens: last4 - string Last 4 digits of the check

{} It's a method of the class: WC_Payment_Token_ECheck{}

No Hooks.

Return

true|false. True if the passed data is valid

Usage

$WC_Payment_Token_ECheck = new WC_Payment_Token_ECheck();
$WC_Payment_Token_ECheck->validate();

Changelog

Since 2.6.0 Introduced.

Code of WC_Payment_Token_ECheck::validate() WC 5.9.0

public function validate() {
	if ( false === parent::validate() ) {
		return false;
	}

	if ( ! $this->get_last4( 'edit' ) ) {
		return false;
	}
	return true;
}