'; echo '

' . esc_html__( 'Help us keep your store discoverable to AI shoppers', 'agentic-commerce-for-woocommerce' ) . '

'; echo '

' . esc_html__( 'Switch this on and we get a heads-up when something quietly breaks your store\'s AI connection — a failed catalog sync, a blocked endpoint, a connection that drops — so we can flag it or fix it before your products fall out of ChatGPT, Claude and Perplexity. It also unlocks your AI-bot crawl insights: see which AI crawlers visit your store and whether they reach your discovery files. We only ever see plugin events (activated, connected, audit re-run, sync errors) tied to your site URL, plus anonymous counts of known AI bots and an aggregate tally of human pageviews (a number only, so you can see the AI-vs-human split) — never customer data, order data, or any personal information. Change it any time under Settings → xpay.', 'agentic-commerce-for-woocommerce' ) . ' '; echo '' . esc_html__( 'See exactly what\'s sent', 'agentic-commerce-for-woocommerce' ) . '.

'; echo '

'; echo '' . esc_html__( 'Share anonymous diagnostics', 'agentic-commerce-for-woocommerce' ) . ' '; echo '' . esc_html__( 'No thanks', 'agentic-commerce-for-woocommerce' ) . ''; echo '

'; echo ''; } public function handle_choice() { if ( ! current_user_can( 'manage_woocommerce' ) ) { wp_die( esc_html__( 'Not allowed.', 'agentic-commerce-for-woocommerce' ) ); } check_admin_referer( self::ACTION ); $raw = isset( $_GET['choice'] ) ? sanitize_key( wp_unslash( $_GET['choice'] ) ) : ''; $choice = ( 'yes' === $raw ) ? 'yes' : 'no'; Xpay_Telemetry::set_opt_in( $choice ); $ref = wp_get_referer(); wp_safe_redirect( $ref ? $ref : admin_url( 'plugins.php' ) ); exit; } }