get( 'general.keep_conversations', true ), (int) $settings->get( 'general.conversation_retention_days', ChatbotConstants::DEFAULT_CONVERSATION_RETENTION_DAYS ) ), false ) ) ); } /** * The suggested paragraphs, in the "Suggested text" convention of the * other privacy policy registrants (Core, WooCommerce). * * @param bool $keep_conversations Whether answered questions and replies are kept. * @param int $retention_days Days the chat records are kept. * @return string */ public static function content( bool $keep_conversations, int $retention_days ): string { $retention_days = max( ChatbotConstants::MIN_CONVERSATION_RETENTION_DAYS, $retention_days ); $lines = array(); $lines[] = '' . __( 'Suggested text:', 'ai-product-tools' ) . ''; $lines[] = __( 'This site offers an AI shop assistant (AI Product Tools). What a visitor types into it, the earlier messages of the same chat and the name they entered in the optional contact form, if any, are sent, together with information about the store\'s products, to the AI provider the store has chosen, which writes the reply under its own terms and privacy policy. The email address is not sent to the AI provider.', 'ai-product-tools' ); if ( $keep_conversations ) { $lines[] = sprintf( /* translators: %d: number of days the chat records are kept */ _n( 'Each question and the assistant\'s reply are stored on this site\'s server so the store can review them, and deleted after %d day. Messages the assistant could not answer are stored so the store can reply, and deleted after the same period.', 'Each question and the assistant\'s reply are stored on this site\'s server so the store can review them, and deleted after %d days. Messages the assistant could not answer are stored so the store can reply, and deleted after the same period.', $retention_days, 'ai-product-tools' ), $retention_days ); } else { $lines[] = sprintf( /* translators: %d: number of days the chat records are kept */ _n( 'Questions the assistant answers are not stored on this site\'s server. Messages it could not answer are stored so the store can reply, and deleted after %d day.', 'Questions the assistant answers are not stored on this site\'s server. Messages it could not answer are stored so the store can reply, and deleted after %d days.', $retention_days, 'ai-product-tools' ), $retention_days ); } $lines[] = __( 'If a visitor fills in the assistant\'s optional contact form, their name and email address are stored with their consent, the address encrypted, and deleted after the same period. A visitor can ask the store to export or erase this data; it is found by email address. Chats without an email address are not linked to a person.', 'ai-product-tools' ); $lines[] = __( 'The chat window keeps the conversation, a random chat ID and the name and email address entered in the contact form in the visitor\'s own browser (local storage), so the chat continues from page to page. It also remembers which part of the chat window was open and whether the visitor opened the chat. This stays in the browser until the visitor clears this site\'s data there.', 'ai-product-tools' ); $lines[] = __( 'To limit how many messages one visitor can send, the assistant keeps a salted hash of the visitor\'s IP address for up to two days, never the address itself.', 'ai-product-tools' ); return implode( "\n\n", $lines ); } }