WC_Payment_Token::get_invalid_token_fields │ public │ WC 11.3.0

Get the invalid token fields.

Method of the class: WC_Payment_Token{}

No Hooks.

Returns

array<string, mixed>. The invalid token fields with the field name as the key and the field value as the value.

Usage

$WC_Payment_Token = new WC_Payment_Token();
$WC_Payment_Token->get_invalid_token_fields(): array;

Changelog

Since 11.3.0 Introduced.

WC_Payment_Token::get_invalid_token_fields() code WC 11.3.0

public function get_invalid_token_fields(): array {
	$token = $this->get_prop( 'token', 'edit' );
	if ( empty( $token ) ) {
		return array( 'token' => $token );
	}
	return array();
}