Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WooCommerce: fix form fields #2089

Merged
merged 3 commits into from Mar 27, 2024
Merged

Conversation

IanDelMar
Copy link
Contributor

@IanDelMar IanDelMar commented Feb 12, 2023

Description

This PR fixes

  1. the state field for countries without states in WC,
  2. the radio and the checkbox fields if no label is provided.

Motivation and Context

  1. WC renders a text input field if it does not know about a given country's states.
  2. $args['label'] is always set, hence isset() was always true and must be replaced with a check for an empty string.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring (a code change that neither fixes a bug nor adds a feature)
  • Styling (changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc))
  • Development (changes that affect the build system or external dependencies)
  • Documentation (changes that affect existing inline documentation)

Checklist:

  • I pulled my branch from develop.
  • I am submitting my pull request to develop.
  • I have resolved any conflicts merging this pull request would create.
  • I have checked that there aren't other open Pull Requests for the same update/change.
  • My code follows the code style of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • (Optional) My change requires a change to the documentation.
  • (Optional) I have updated the documentation accordingly.
  • (Optional) My change requires a change to the translations.
  • (Optional) I have updated the translations accordingly.
  • composer phpcs has passed locally.
  • composer php-lint has passed locally.
  • composer phpmd has passed locally.
  • composer phpstan has passed locally.
  • I have read the CONTRIBUTING document.

Related Issues or Roadmap requests

Fixes #2087

Further comments

@IanDelMar IanDelMar changed the base branch from main to develop February 12, 2023 14:07
@bacoords bacoords added this to the 1.2.4 milestone Mar 19, 2024
@bacoords bacoords merged commit c18d0c2 into understrap:develop Mar 27, 2024
5 checks passed
@bacoords bacoords mentioned this pull request Mar 27, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Woocommerce county field missing the CSS class form-control making it styled different to other textfields
2 participants