Merge pull request #13793 from woocommerce/fix-13785

Load values only when not-empty/set
This commit is contained in:
Mike Jolley 2017-03-28 17:00:32 +01:00 committed by GitHub
commit ae7c4e713b
1 changed files with 2 additions and 2 deletions

View File

@ -981,8 +981,8 @@ class WC_Checkout {
}
if ( is_callable( array( WC()->customer, "get_$input" ) ) ) {
$value = WC()->customer->{"get_$input"}();
} else {
$value = WC()->customer->{"get_$input"}() ? WC()->customer->{"get_$input"}() : null;
} elseif ( WC()->customer->meta_exists( $input ) ) {
$value = WC()->customer->get_meta( $input, true );
}