Deprecated $context on get_display_name.
This commit is contained in:
parent
fb124232cf
commit
b917a87a73
|
@ -92,6 +92,7 @@ include_once( WC_ABSPATH . 'includes/legacy/abstract-wc-legacy-payment-token.php
|
|||
* Overwritten by child classes.
|
||||
*
|
||||
* @since 2.6.0
|
||||
* @param string $deprecated Deprecated since WooCommerce 3.0
|
||||
* @return string Payment Token Type (CC, eCheck)
|
||||
*/
|
||||
public function get_type( $deprecated = '' ) {
|
||||
|
@ -103,10 +104,10 @@ include_once( WC_ABSPATH . 'includes/legacy/abstract-wc-legacy-payment-token.php
|
|||
* Get's overwritten by child classes.
|
||||
*
|
||||
* @since 2.6.0
|
||||
* @param string $context
|
||||
* @param string $deprecated Deprecated since WooCommerce 3.0
|
||||
* @return string
|
||||
*/
|
||||
public function get_display_name( $context = 'view' ) {
|
||||
public function get_display_name( $deprecated = '' ) {
|
||||
return $this->get_type();
|
||||
}
|
||||
|
||||
|
|
|
@ -36,17 +36,17 @@ class WC_Payment_Token_CC extends WC_Payment_Token {
|
|||
* Get type to display to user.
|
||||
*
|
||||
* @since 2.6.0
|
||||
* @param string $context
|
||||
* @param string $deprecated Deprecated since WooCommerce 3.0
|
||||
* @return string
|
||||
*/
|
||||
public function get_display_name( $context = 'view' ) {
|
||||
public function get_display_name( $deprecated = '' ) {
|
||||
/* translators: 1: credit card type 2: last 4 digits 3: expiry month 4: expiry year */
|
||||
$display = sprintf(
|
||||
__( '%1$s ending in %2$s (expires %3$s/%4$s)', 'woocommerce' ),
|
||||
wc_get_credit_card_type_label( $this->get_card_type( $context ) ),
|
||||
$this->get_last4( $context ),
|
||||
$this->get_expiry_month( $context ),
|
||||
substr( $this->get_expiry_year( $context ), 2 )
|
||||
wc_get_credit_card_type_label( $this->get_card_type() ),
|
||||
$this->get_last4(),
|
||||
$this->get_expiry_month(),
|
||||
substr( $this->get_expiry_year(), 2 )
|
||||
);
|
||||
return $display;
|
||||
}
|
||||
|
|
|
@ -34,10 +34,10 @@ class WC_Payment_Token_eCheck extends WC_Payment_Token {
|
|||
* Get type to display to user.
|
||||
*
|
||||
* @since 2.6.0
|
||||
* @param string $context
|
||||
* @param string $deprecated Deprecated since WooCommerce 3.0
|
||||
* @return string
|
||||
*/
|
||||
public function get_display_name( $context = 'view' ) {
|
||||
public function get_display_name( $deprecated = '' ) {
|
||||
return __( 'eCheck', 'woocommerce' );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue