End function requires variable to prevent strict standards errors
Just a temporary variable that is only used to pass an actual variable to the PHP end function (as that takes a reference as argument). This prevents strict standard errors.
This commit is contained in:
parent
792e3605fe
commit
bae582e3ff
|
@ -958,10 +958,11 @@ class WC_Countries {
|
|||
$address_fields = array();
|
||||
|
||||
foreach ( $fields as $key => $value ) {
|
||||
$keys = array_keys( $fields );
|
||||
$address_fields[ $type . $key ] = $value;
|
||||
|
||||
// Add email and phone after company or last
|
||||
if ( $type == 'billing_' && ( 'company' === $key || ( ! array_key_exists( 'company', $fields ) && $key === end( array_keys( $fields ) ) ) ) ) {
|
||||
if ( $type == 'billing_' && ( 'company' === $key || ( ! array_key_exists( 'company', $fields ) && $key === end( $keys ) ) ) ) {
|
||||
$address_fields['billing_email'] = array(
|
||||
'label' => __( 'Email Address', 'woocommerce' ),
|
||||
'required' => true,
|
||||
|
|
Loading…
Reference in New Issue