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
List Custom Fields for New Product Editor #45360
Conversation
Hi @octaedro, 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: |
Test Results SummaryCommit SHA: f1969c4
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. |
0664c66
to
10252ff
Compare
'description' => sprintf( | ||
/* translators: %1$s: Custom fields guide link opening tag. %2$s: Custom fields guide link closing tag. */ | ||
__( 'Custom fields can be used in a variety of ways, such as sharing more detailed product information, showing more input fields, or internal inventory organization. %1$sRead more about custom fields?%2$s', 'woocommerce' ), | ||
'<a href="https://woo.com" target="_blank" rel="noreferrer">', |
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.
The link in the design is pointing to woo.com
but I think that it would be better to point to the WordPress custom fields documentation.
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.
Yes, agree! That's the correct link, thank you!
…d block definition since it is not used
92634f7
to
f1969c4
Compare
"lock": false, | ||
"__experimentalToolbar": false | ||
}, | ||
"usesContext": [ "postType" ], |
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.
I think that we can remove this.
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.
Good job @mdperez86! This is testing well on my end and the code looks good. I just left one comment that could be addressed in the other PR.
* Create woocommerce/product-custom-fields block * Register woocommerce/product-custom-fields block * Add product-custom-fields block to the simple product template * Create useCustomFields hook * Create empty state * Create CustomFields component * Add custom fields table * Add custom field remove button * Hide the custom fields table base on the toggle value * Remove non list features * Add changelog files * Fix linter errors * Fix empty state styles * Fix php linter error * Remove context from the woocommerce/product-custom-fields-toggle-field block definition since it is not used * Change url for the Read more about custom fields
Submission Review Guidelines:
Changes proposed in this Pull Request:
Partially close #44169
Depends on #45291
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
New product editor
is enabled under/wp-admin/admin.php?page=wc-settings&tab=advanced§ion=features
product-custom-fields
is enabled underFeatures
tab from/wp-admin/tools.php?page=woocommerce-admin-test-helper
(WooCommerce Beta Tester plugin) is requiredProducts
->Add new
from the left menu to create a new productOrganization
tabShow custom fields
toggle should be shownCustom fields
section listing the custom fields that belong to the editing product metasNOTE:
total_sales
is automatically added as a custom field to each product in the classic editor. This field is not added or shown automatically in the new editor for now.Changelog entry
Significance
Type
Message
Comment