WC_Payment_Token::validate()
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() WC Payment Token::validate code WC 9.7.1
public function validate() { $token = $this->get_prop( 'token', 'edit' ); if ( empty( $token ) ) { return false; } return true; }