'; echo '

' . esc_html__( 'Agentic Commerce for WooCommerce — help us improve onboarding', 'agentic-commerce-for-woocommerce' ) . '

'; echo '

' . esc_html__( 'May we send anonymous lifecycle events (plugin activated, store connected, audit re-run, sync errors) to help us catch broken onboarding flows? No PII or customer data is ever sent. You can change this any time under Settings → xpay.', 'agentic-commerce-for-woocommerce' ) . ' '; echo '' . esc_html__( 'What gets sent', 'agentic-commerce-for-woocommerce' ) . '.

'; echo '

'; echo '' . esc_html__( 'Enable anonymous telemetry', '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; } }