WC_Payment_Token_Data_Store::read_extra_data( WC_Payment_Token $token )
Read extra data associated with the token (like last4 digits of a card for expiry dates).
Description Description
Parameters Parameters
- $token
-
(Required) Payment token object.
Source Source
File: includes/data-stores/class-wc-payment-token-data-store.php
protected function read_extra_data( &$token ) { foreach ( $token->get_extra_data_keys() as $key ) { $function = 'set_' . $key; if ( is_callable( array( $token, $function ) ) ) { $token->{$function}( get_metadata( 'payment_token', $token->get_id(), $key, true ) ); } } }
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |