From b6657403f83e5e7e058542d5100a6edac1a2d804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alba=20Rinc=C3=B3n?= Date: Fri, 24 Nov 2023 14:40:37 +0100 Subject: [PATCH] [Store Customization] Update the store title with an AI generated one (#41632) * Make the call to update the store title with an AI generated one * Add changelog --- .../client/customize-store/design-with-ai/services.ts | 8 ++++++++ plugins/woocommerce/changelog/update-store-name-with-ai | 4 ++++ 2 files changed, 12 insertions(+) create mode 100644 plugins/woocommerce/changelog/update-store-name-with-ai diff --git a/plugins/woocommerce-admin/client/customize-store/design-with-ai/services.ts b/plugins/woocommerce-admin/client/customize-store/design-with-ai/services.ts index beaac8bd108..3515b6c39ba 100644 --- a/plugins/woocommerce-admin/client/customize-store/design-with-ai/services.ts +++ b/plugins/woocommerce-admin/client/customize-store/design-with-ai/services.ts @@ -275,6 +275,14 @@ export const updateStorePatterns = async ( context.businessInfoDescription.descriptionText, }, } ), + apiFetch( { + path: '/wc/private/ai/store-title', + method: 'POST', + data: { + business_description: + context.businessInfoDescription.descriptionText, + }, + } ), ] ); if ( ! response.ai_content_generated ) { diff --git a/plugins/woocommerce/changelog/update-store-name-with-ai b/plugins/woocommerce/changelog/update-store-name-with-ai new file mode 100644 index 00000000000..be274c36673 --- /dev/null +++ b/plugins/woocommerce/changelog/update-store-name-with-ai @@ -0,0 +1,4 @@ +Significance: minor +Type: enhancement + +Call to the store title endpoint to update the store title with an AI generated one