-
Notifications
You must be signed in to change notification settings - Fork 219
Conversation
To avoid creating products that are things that cannot be sold in stores (forests, people, etc.)
The release ZIP for this PR is accessible via:
Script Dependencies ReportThere is no changed script dependency between this branch and trunk. This comment was automatically generated by the TypeScript Errors Report
🎉 🎉 This PR does not introduce new TS errors. |
Size Change: -4 B (0%) Total Size: 1.61 MB
ℹ️ View Unchanged
|
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.
Great work! Tested with the following prompts:
I sell milk
A premier online destination for the latest electronic gadgets, offering everything from cutting-edge smartphones to innovative smart home devices, with expert reviews and tech support.
A paradise for book lovers, featuring a vast collection of books in various genres, including rare and out-of-print editions, with a community forum for discussions and book recommendations.
An online store dedicated to pet lovers, providing a variety of pet supplies, toys, and food for different animals, along with a pet adoption service and a blog for pet care tips.
I still see some instances where the product description doesn't necessarily describe what the business is selling, such as "Pots fence" for a pet supplies store or "Coffee Table Set" for a bookshop.
We still need to further investigate if it's possible to fine-tune these prompts to ensure the business description consistently takes priority over the image description, but can be done on a separate PR.
Regarding:
It also adds a condition to check the images param in the PatternUpdater to avoid a fatal error when calling the endpoint without any images:
[23-Nov-2023 08:42:10 UTC] PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /public/wp-content/plugins/woocommerce-gutenberg-products-block-11877/src/Patterns/PatternUpdater.php:64
Nice catch!
What
This PR does some prompt fine-tuning to avoid creating products that are things that cannot be sold in stores (forests, people, etc.).
It also adds a condition to check the images param in the
PatternUpdater
to avoid a fatal error when calling the endpoint without any images:[23-Nov-2023 08:42:10 UTC] PHP Fatal error: Uncaught TypeError: count(): Argument woocommerce/woocommerce-blocks#12058 ($value) must be of type Countable|array, null given in /public/wp-content/plugins/woocommerce-gutenberg-products-block-11877/src/Patterns/PatternUpdater.php:64
Why
Testing Instructions
Please consider any edge cases this change may have, and also other areas of the product this may impact.
/wp-admin/tools.php?page=woocommerce-admin-test-helper
and enablecustomize-store
feature flag:Test the CYS experience
Screenshots or screencast
WooCommerce Visibility
Required:
Checklist
Required:
[type]
label or a[skip-changelog]
label.Conditional:
[skip-changelog]
label is not present).Changelog