[Product Variation Attributes] Do not use ignore case when renaming attributes #12608
+34
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes: #12561
Description
With this PR we fix the issue that was preventing users from renaming their variation attributes from a different case (upper to lower or vice-versa)
Note: there are other cases where we ignore the case for attributes: when adding a new attribute, or when deleting them. I preferred to leave them like that as we could have unexpected cases if we modified. For renaming it's ok though, as this case is isolated enough.
Steps to reproduce
Testing information
See steps to reproduce
The tests that have been performed
I ensured with the steps to reproduce that it's working properly. I also verified it in wc-admin
Images/gif
Before
CannotRename.mp4
After
Screen_Recording_20240913_160949_WooCommerce.Dev.mp4
RELEASE-NOTES.txt
if necessary. Use the "[Internal]" label for non-user-facing changes.Reviewer (or Author, in the case of optional code reviews):
Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement: