-
Notifications
You must be signed in to change notification settings - Fork 221
CYS: Add DELETE private/ai/products endpoint #12076
CYS: Add DELETE private/ai/products endpoint #12076
Conversation
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: 0 B 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 @gigitux ! Confirmed all dummy products are reset when making a DELETE request to '/wc/private/ai/products'
:
Screen.Recording.2023-12-06.at.17.48.31.mov
I've just pushed a change ( 138dc8b ) to update the hash for the dummy product when the content is reset, otherwise, it wouldn't be updated with AI-generated content on the subsequent successful connections to AI as the $current_product_hash
would not be equal to $ai_modified_product_hash
anymore on
if ( $current_product_hash === $ai_modified_product_hash || $dummy_product_not_modified || $dummy_product_recently_modified ) { |
Yeah! Good point! Thanks for pushing the commit! I will wait for the E2E tests to run and after that, I will merge the PR! 🙇 |
What
Fixes #12067
Why
This PR introduces a new endpoint to reset the products for the CYS AI offline flow.
Testing Instructions
Please consider any edge cases this change may have, and also other areas of the product this may impact.
WooCommerce Visibility
Required: