Fix "Can't use method return value in write context" errors

This commit is contained in:
Mike Jolley 2016-03-23 10:13:51 +00:00
parent 8d76396eaf
commit 6a1cc6a472
2 changed files with 7 additions and 7 deletions

View File

@ -36,27 +36,27 @@ class WC_Payment_Token_CC extends WC_Payment_Token {
return false;
}
if ( empty( $this->get_meta( 'last4' ) ) ) {
if ( ! $this->get_last4() ) {
return false;
}
if ( empty( $this->get_meta( 'expiry_year' ) ) ) {
if ( ! $this->get_expiry_year() ) {
return false;
}
if ( empty( $this->get_meta( 'expiry_month' ) ) ) {
if ( ! $this->get_expiry_month() ) {
return false;
}
if ( empty ( $this->get_meta( 'card_type' ) ) ) {
if ( ! $this->get_card_type() ) {
return false;
}
if ( 4 !== strlen( $this->get_meta( 'expiry_year' ) ) ) {
if ( 4 !== strlen( $this->get_expiry_year() ) ) {
return false;
}
if ( 2 !== strlen( $this->get_meta( 'expiry_month' ) ) ) {
if ( 2 !== strlen( $this->get_expiry_month() ) ) {
return false;
}

View File

@ -34,7 +34,7 @@ class WC_Payment_Token_eCheck extends WC_Payment_Token {
return false;
}
if ( empty( $this->get_meta( 'last4' ) ) ) {
if ( ! $this->get_last4() ) {
return false;
}
return true;