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
Do not disable "Used for variations" checkbox #39502
Conversation
…for product type switching
Test Results SummaryCommit SHA: 144606f
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
Hi , @woocommerce/mothra Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
@mattsherman any related issues were closed in favor of #39490 during triage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this @mattsherman.
Tested as described. Approving, pending a fix to the failing test.
@@ -619,7 +621,13 @@ public static function add_attribute() { | |||
$attribute->set_name( sanitize_text_field( wp_unslash( $_POST['taxonomy'] ) ) ); | |||
/* phpcs:disable WooCommerce.Commenting.CommentHooks.MissingHookComment */ | |||
$attribute->set_visible( apply_filters( 'woocommerce_attribute_default_visibility', 1 ) ); | |||
$attribute->set_variation( apply_filters( 'woocommerce_attribute_default_is_variation', 1 ) ); | |||
$attribute->set_variation( | |||
apply_filters( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would reverting to the previous functionality be sufficient?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would also fix the test-- setting a simple product as the default could create more edge cases in the future 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AnnaMag I don't see any failing test. What test are you referring to?
I'd prefer not to revert to the previous functionality, since Jarek has been quite set that this change will help prevent confusion based on his user research.
* Do not disable "Used for variations" checkbox (#39502) * Prep for cherry pick 39502 --------- Co-authored-by: Matt Sherman <matt.sherman@automattic.com> Co-authored-by: WooCommerce Bot <no-reply@woocommerce.com>
Submission Review Guidelines:
Changes proposed in this Pull Request:
This PR makes a few changes related to the "Used for variations" checkbox:
variable
.woocommerce_added_attribute
trigger has been restored. This is needed by extensions such as WooCommerce Subscriptions in order to re-show the "Used for variations" checkbox when it is hidden.Fixes #39490.
Fixes #39338 (this was closed previously even though it was not fixed)
Fixes #39502 (this was closed previously even though it was not fixed)
How to test the changes in this Pull Request:
Changelog entry
Significance
Type
Message
Comment