plugin = $plugin; } /** * Registers the suggested text. */ public function register(): void { add_action( 'admin_init', array( $this, 'add_policy_content' ) ); } /** * Adds the text to the policy guide. */ public function add_policy_content(): void { if ( ! function_exists( 'wp_add_privacy_policy_content' ) ) { return; } wp_add_privacy_policy_content( 'Tidelist', wp_kses_post( wpautop( self::text( $this->channel_names() ) ) ) ); } /** * Names of the marketplaces the plugin works with, for example "Shop A, Shop B". */ private function channel_names(): string { return implode( ', ', array_map( static function ( $channel ) { return $channel->label(); }, $this->plugin->channels()->all() ) ); } /** * The suggested text. * * @param string $channel_label Name of the marketplace, or the names of several. */ public static function text( string $channel_label ): string { return implode( "\n\n", array( __( 'Tidelist does not collect or store any personal data about your customers or the visitors of your site.', 'tidelist' ), Text::channel( __( 'When the shop owner publishes or updates an advert, Tidelist sends the product data (title, description, photos, price, attributes) and the contact name, phone number and city that the shop owner entered in the settings to the {channel} marketplace of the chosen country. Nothing is sent without the shop owner starting it. {channel} handles that data under its own terms and privacy policy.', 'tidelist' ), $channel_label ), Text::channel( __( 'The {channel} connection data (the application credentials and access tokens) is stored encrypted in the site database.', 'tidelist' ), $channel_label ), ) ); } }