get_expiry_year() public method

Returns the card expiration year (YYYY).
Since: 2.6.0
public get_expiry_year ( string $context = 'view' ) : string
$context string
return string Expiration year
示例#1
0
 /**
  * Test get/set expiry year.
  * @since 2.6.0
  */
 public function test_wc_payment_token_cc_expiry_year()
 {
     $token = new WC_Payment_Token_CC();
     $token->set_expiry_year('2016');
     $this->assertEquals('2016', $token->get_expiry_year());
 }