=== SurfCoins ===
Contributors: naturalsurf
Tags: digital wallet, loyalty, rewards, user balance, qr code
Requires at least: 6.0
Tested up to: 7.0
Stable tag: 2.1.23
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

The open digital wallet for WordPress: manage user balances, rewards, transaction history, and wallet QR codes.

== Description ==

**SurfCoins** adds digital wallets and loyalty balances to WordPress users.

The Community edition provides manual wallet administration. Authorized administrators can create wallets, credit or debit individual users, review balances, and inspect transaction history.

= Main Features =

* Digital wallets for registered WordPress users.
* Manual credit and debit operations.
* Financial Center with user search and balance management.
* Individual transaction history.
* Public wallet identifier and QR code.
* Administrative dashboard and system diagnostics.
* Shortcodes for wallet, balance, history, and QR code.
* Compatibility layer for existing SurfCoins installations.

= Transaction History =

Wallet movements are recorded so administrators and users can review the transaction type, amount, description, and date.

= Wallet QR Code =

Each wallet can display a public identifier and QR code. The QR image is generated through the external QRServer service. See the Privacy section for details.

= Shortcodes =

* `[surfcoins_carteira]` — displays the complete wallet for the logged-in user.
* `[surfcoins_saldo]` — displays the current wallet balance.
* `[surfcoins_meu_qrcode]` — displays the wallet QR code and public identifier.
* `[surfcoins_historico]` — displays the transaction history.
* `[surfcoins_acoes_rapidas]` — displays wallet quick actions.
* `[surfcoins_carteira_publica]` — displays public wallet identification.
* `[surfcoins_users]` — displays the searchable member directory with online/offline status.

== Installation ==

1. In WordPress, open **Plugins > Add Plugin > Upload Plugin**.
2. Select the SurfCoins ZIP file and install it.
3. Activate **SurfCoins**.
4. Open **SurfCoins > Financial Center** to search for users and manage balances.
5. SurfCoins automatically creates the **Minha Carteira** page with the `[surfcoins_carteira]` shortcode. Add any other desired shortcodes to WordPress pages.

Updating or deactivating the plugin does not automatically remove existing wallets, balances, or transactions.

== Frequently Asked Questions ==

= Can an administrator credit SurfCoins manually? =

Yes. Authorized administrators can credit an individual user's wallet.

= Can an administrator debit SurfCoins manually? =

Yes, provided that the wallet has sufficient balance and the current user has the required permission.

= What happens to data when the plugin is deactivated? =

Deactivation does not remove wallets, balances, or transaction records.

= Does the QR code use an external service? =

Yes. Wallet QR images are generated by the external QR Code API operated by goQR.me / Foundata GmbH at `api.qrserver.com`. See the External Services section below for the data sent and the provider's legal documents.

== Privacy ==

SurfCoins stores wallet, balance, and transaction information in the WordPress database to provide its features.

When a wallet QR code is displayed, the visitor's browser requests the QR image from the external QR Code API at `api.qrserver.com`. The request contains the public wallet URL encoded into the QR code plus image-generation parameters such as size, format, and margin. SurfCoins does not intentionally include the wallet balance, password, or email address in that request.

The provider may receive technical request information as described in its privacy statement. SurfCoins adds suggested privacy-policy text to the WordPress Privacy settings screen so site owners can disclose this integration where required.

== External Services ==

= QR Code API (goQR.me / Foundata GmbH) =

SurfCoins uses the QR Code API hosted at `api.qrserver.com` to generate the PNG image for a user's public wallet QR code. This external request occurs when a SurfCoins wallet QR image is displayed in the browser.

The request sends the public SurfCoins wallet URL that must be encoded into the QR image, together with image parameters such as the requested dimensions, PNG format, and margin. The provider may also receive normal technical request information from the browser or HTTP client. No wallet password, email address, or wallet balance is intentionally sent by SurfCoins to this service.

Service provider: goQR.me / Foundata GmbH.

* Terms of Service: https://goqr.me/legal/tos-api.html
* Privacy Policy for the QR Code API: https://goqr.me/de/rechtliches/datenschutz-api.html
* API documentation: https://goqr.me/api/

== Source Code ==

The JavaScript shipped with SurfCoins is the human-readable source used by the plugin. The plugin does not require npm, webpack, a minifier, or another build step to regenerate the distributed JavaScript files. No compiled or minified JavaScript artifact is required for normal operation.

== Screenshots ==

1. Digital Wallet and Quick Actions: view the balance, access the wallet QR code, review history, and find the main SurfCoins features in one place.
2. Responsive mobile experience: the Digital Wallet adapts to smaller screens while keeping the balance, quick actions, and navigation accessible.
3. SurfCoins Dashboard: monitor wallets, users, SurfCoins in circulation, transactions, and platform integrity indicators.
4. Financial Center: search users, review individual wallets, and access administrative tools for wallet operations.
5. Registration Bonus: configure the automatic SurfCoins credit granted once to newly registered users.

== Changelog ==

= 2.1.23 =
* Adds a Community Transferir quick action that opens a SurfCoins Business information modal when no transfer add-on is active.
* Automatically omits the Community Transferir fallback when SurfCoins Transfer is active, preventing duplicate actions.
* Keeps transfer execution outside Community while preserving the standalone add-on architecture.

= 2.1.22 =
* Redesigns the welcome-bonus settings screen with a responsive card, accessible toggle, and clearer value controls.
* Aligns dashboard, financial-center, and settings actions with the standalone SurfCoins visual system.
* Keeps all administrative styling inside Community with no dependency on SurfCoins UI 2.0 or PRO.

= 2.1.21 =
* Adds a complete standalone Community visual layer that does not depend on SurfCoins UI 2.0.
* Protects wallet buttons, cards, lists, and modals from conflicting global theme styles.
* Improves responsive presentation, visible keyboard focus, reduced-motion support, and the Business add-on information card.

= 2.1.20 =
* Makes the distributed wallet JavaScript directly human-readable with no build step required.
* Fixes balance validation for invalid users and removes an undefined variable notice.
* Removes dormant transfer-preview and recipient-transfer code from Community; separate extensions remain responsible for their own transfer implementation.
* Documents the external QR Code API with its Terms of Service, Privacy Policy, and API documentation.
* Uses a consistent SurfCoins class prefix while retaining compatibility aliases for existing integrations.
* Improves late output escaping and removes bundled PO/MO translation files in favor of WordPress.org translations.

= 2.1.18 =
* Adds a neutral cashback-receiver extension point to Wallet Quick Actions.
* Shows a clearly identified BUSINESS action without bundling Business scanner or financial logic in Community.
* Lets compatible add-ons provide the cashback receiver modal while Community remains independently functional.

= 2.1.14 =
* Keeps local SurfCoins profile photos available through WordPress avatars independently of migration tools.
* Adds native support for the `surfcoins_profile_photo_id` user meta.


= 2.1.13 =
* Adds a dedicated default-page manager for the SurfCoins wallet.
* Automatically creates or reuses the published “Minha Carteira” page with the `[surfcoins_carteira]` shortcode on activation.
* Prevents duplicate wallet pages by reusing the stored page, canonical slug, or an existing page containing the wallet shortcode.
* Stores the wallet page ID for reliable future integrations while preserving backwards compatibility.

= 2.1.12 =
* Reworked member online/offline filtering to use WordPress APIs only.
* Removed direct database queries and exclusionary user-query parameters from the members directory.
* Preserved the 5-minute online window and legacy activity user meta.

= 2.1.11 =
* Replaces member-status `meta_query` filters with a dedicated indexed activity table.
* Preserves the existing five-minute online window, member search, status filters, and pagination.
* Keeps the legacy activity user meta synchronized for backwards compatibility with existing integrations.
* Removes the two slow `meta_query` warnings reported by Plugin Check for the member directory.

== Upgrade Notice ==

= 2.1.23 =
Adds a non-duplicating Transferir entry point for standalone Community installations while preserving SurfCoins Transfer ownership of the real transfer workflow.

= 2.1.22 =
Recommended administrative visual update. Existing wallets, bonuses, balances, history, public identifiers, and extension hooks are preserved.

= 2.1.21 =
Recommended visual update for standalone Community installations. Existing wallets, balances, history, public identifiers, and extension hooks are preserved.

= 2.1.20 =
WordPress.org compliance update. Existing wallets, balances, transaction history, public wallet identifiers, and Business extension hooks are preserved.
