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.


Top ↑

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 ) );
			}
		}
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.