WC_Payment_Token::validate()publicWC 2.6.0

Validate basic token info (token and type are required).

Method of the class: WC_Payment_Token{}

No Hooks.

Return

true|false. True if the passed data is valid

Usage

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

Changelog

Since 2.6.0 Introduced.

WC_Payment_Token::validate() code WC 8.6.1

public function validate() {
	$token = $this->get_prop( 'token', 'edit' );
	if ( empty( $token ) ) {
		return false;
	}
	return true;
}