Skip to content

Commit

Permalink
Merge pull request #1771 from Automattic/fix/correct-phone-field
Browse files Browse the repository at this point in the history
fix(ras-acc): don't show phone field when it's not enabled
  • Loading branch information
laurelfulford authored Jun 27, 2024
2 parents 494b930 + c66f247 commit 8c480ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion includes/class-modal-checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,9 @@ public static function woocommerce_checkout_fields( $fields ) {
/**
* Add the form-row-last CSS class to billing phone field.
*/
$fields['billing']['billing_phone']['class'] = 'form-row-last';
if ( in_array( 'billing_phone', $billing_fields, true ) ) {
$fields['billing']['billing_phone']['class'] = 'form-row-last';
}

return $fields;
}
Expand Down

0 comments on commit 8c480ab

Please sign in to comment.