woocommerce/plugins
Patricia Hillebrandt 70a379a2d6 Store Customization > Update products with AI generated content (https://github.com/woocommerce/woocommerce-blocks/pull/11155)
* Introduce the ProductUpdater class.

* Update the image assignment for the default products content.

* Update the default products content.

* Introduce the generate_content and get_placeholder_products methods.

* Update the get_placeholder_products method and introduce the new create_new_product method.

* Verify the hash of the product content and compare it with the hash of the ai generated content to ensure we wont override products modified by the store owner.

* Add docblocks and update the structure for the ProductUpdater class.

* Pass the vertical images as a param for the PatternUpdater and the ProductUpdater.

* Update the provided variable to the PatternUpdater class.

* Update the ProductUpdater class to include the requirements for usage of the media_sideload_image method outside the wp-admin area (via API) and other adjustments to the products generation and hashes

* remove unnecessary calls to post/product images.

* Update the loop for generating products.

* Further adjustments to the Product Updater.

* Provide the business_description as a param for the generate_content ProductUpdates

* Update the default timeout for the AI connection; update the path to the default image. Add a limit of 6 when quering the total products created by the store owner.

* Add new neutral placeholder images for products and patterns.

* Update the prompt and the logic for the placeholder images.

* Remove placeholder images.

* Increase max execution time

* Update the products query.

* Move the media_sideload_image function dependencies to outside of the loop and add comment.

* Update text content.

* Address code review.

* bail early if no business description provided.

* Add an extra safety check in case of query errors.

* Address CR.
2023-10-24 13:33:55 +00:00
..
woocommerce-blocks Store Customization > Update products with AI generated content (https://github.com/woocommerce/woocommerce-blocks/pull/11155) 2023-10-24 13:33:55 +00:00