'; echo '

' . esc_html__( 'Turn on diagnostics?', 'agentic-commerce-for-woocommerce' ) . '

'; echo '

' . esc_html__( 'We\'ll spot a broken AI connection before your products drop out of ChatGPT — and you\'ll get your AI-crawler insights.', 'agentic-commerce-for-woocommerce' ) . '

'; echo ''; echo ''; echo ''; echo '
' . esc_html__( 'We send', 'agentic-commerce-for-woocommerce' ) . '
' . esc_html__( 'Plugin events', 'agentic-commerce-for-woocommerce' ) . '
' . esc_html__( 'Your site URL', 'agentic-commerce-for-woocommerce' ) . '
' . esc_html__( 'AI-bot counts', 'agentic-commerce-for-woocommerce' ) . '
' . esc_html__( 'We never send', 'agentic-commerce-for-woocommerce' ) . '
' . esc_html__( 'Customer data', 'agentic-commerce-for-woocommerce' ) . '
' . esc_html__( 'Order details', 'agentic-commerce-for-woocommerce' ) . '
' . esc_html__( 'Anything personal', 'agentic-commerce-for-woocommerce' ) . '
'; echo '

'; echo '' . esc_html__( 'Turn on diagnostics', 'agentic-commerce-for-woocommerce' ) . ' '; echo '' . esc_html__( 'No thanks', 'agentic-commerce-for-woocommerce' ) . ' '; echo '' . esc_html__( 'Change it any time.', 'agentic-commerce-for-woocommerce' ) . ' '; echo '' . esc_html__( 'See exactly what\'s sent', '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; } }