WordPress at Your Fingertips
function is not described

WC_Payment_Token::validate() public WC 2.6.0

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

{} It's a 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.

Code of WC_Payment_Token::validate() WC 5.5.2

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