
== Changelog ==

= v3.9.1 - 2026-08-26 =
* [imp] Tested for compatibility with WordPress 7.1
* [fix] The Order Subtotal commission base now works instead of silently paying on the full order total — commission is calculated on the product subtotal only, with shipping, tax, and fees always excluded and coupons already applied
* [fix] The visits chart no longer treats every visit as a conversion — only visits that produced a referral are counted, so the conversion rate is accurate instead of always showing 100%
* [security] Hardened the exports directory against direct web access — deny rules for Apache and IIS plus index files are now written on every export and on activation, so installs created before this release are protected too

= v3.9 - 2026-08-05 =
* [new] Added a Notification Recipient(s) setting (Email → Admin → General) so admin notifications can be sent to one or more comma-separated addresses, each validated, falling back to the WordPress admin email when left blank
* [imp] The admin dashboard Recent Referrals table now lists every recent referral instead of only the first five
* [imp] Seasonal promotions (admin-bar notice, sidebar CTA, upgrade pricing, and exit-intent popup) now expire on a set date and revert to standard pricing automatically, with no follow-up release needed
* [imp] Normalized the email recipient filters to a consistent array contract, corrected the after-send hook names and arguments, added a recipient filter for account-review emails, and documented every email hook in HOOKS.md
* [fix] Generated affiliate URLs no longer drop non-English characters (Korean, Arabic, and others) from the page path, and URLs now render in readable form in the URL generator, visits, analytics, and recent-referral tables

= v3.8.1 - 2026-07-23 =
* [new] Shipped complete translation catalogs for 10 locales (German, Spanish, French, Brazilian Portuguese, Bengali, Italian, Dutch, Russian, Japanese, and Simplified Chinese)
* [imp] Loaded the plugin text domain on `init` and wired script translations so front-end affiliate dashboards, emails, and cron/webhook contexts now render in the user's language, and refreshed the POT catalog
* [imp] Internationalized all transactional email templates (welcome, commission, payout, and referral emails) and the export-download messages so they are translatable
* [imp] Hid the Join Community card on the admin dashboard

= v3.8 - 2026-07-21 =
* [new] Isolated the affiliate portal (login, registration, and dashboard shortcodes) inside a Shadow DOM so the active theme's styles can no longer break its layout, including Declarative Shadow DOM hydration and explicit reCAPTCHA rendering
* [new] Added per-product custom commission for simple subscription products, priced from the recurring commission settings
* [new] Added a Join Community link in the admin topbar, plus community placements in the setup wizard and dashboard
* [imp] Copy buttons now show a tooltip and a "copied" confirmation
* [imp] Restyled the portal login form to match registration and loaded the Inter webfont for consistent typography
* [fix] The affiliate dashboard now shows the live available balance and counts only unreserved referrals as available credit
* [fix] Allowed a commission amount of zero in settings, affiliate forms, and the edit-affiliate modal, and preserved an explicitly set zero commission
* [fix] Honoured per-product custom commission on subscription renewals, and credited renewals and synced status outside the admin context
* [fix] Cleared the stored transaction ID when a paid referral moves out of the paid status
* [fix] Showed a notice instead of redirecting to the site home page when the affiliate Dashboard page is not configured
* [fix] Surfaced server errors as toast notifications on affiliate portal actions
* [fix] Corrected the portal registration layout (block labels, full-width inputs), kept autofilled fields legible, restored tab visibility, centered field icons, and aligned login input colours with the registration form
* [fix] Improved the responsive layout of the referral, visit, and dashboard tables and the stat/chart cards on mid-width screens (clamped long URLs, adjusted font sizes and padding, and prevented card overflow)
* [security] Enforced a minimum 8-character password when affiliates are created, in both the REST API and the user model

= v3.7.2 - 2026-07-14 =
* [fix] Deleting a generated affiliate link no longer shows a "not a valid JSON response" error and now confirms with a success toast

= v3.7.1 - 2026-07-14 =
* [new] Added a Payout delay (days) setting that withholds commissions from payout until referrals reach a set age — covers legal cancellation windows
* [new] Generated affiliate links now persist across sessions with per-link delete, so affiliates never rebuild campaign links after logout
* [new] Added Pay with Credits support to the WooCommerce Blocks checkout, alongside the existing classic checkout
* [imp] Wrapped affiliate dashboard Settings page strings (profile fields, password placeholders, labels) for translation
* [imp] Made email footer strings translatable and removed the duplicate subject line echoed above the email body
* [fix] Show an empty-state message in the conversion chart when there is no visit/referral data, instead of a thin line

= v3.6 - 2026-07-08 =
* [new] Added a `registration` attribute to the [wc-affiliate-login] shortcode to render the registration form only
* [new] Improved affiliate tracking with cross-domain campaign and visit resolution, plus richer referral activity data
* [imp] Replaced browser confirm dialogs with a styled confirmation modal when deleting visits
* [perf] Faster dashboard using a single aggregated affiliate-statistics query
* [perf] Targeted cache invalidation instead of a full cache flush after data changes
* [security] Hardened all report queries (visits, referrals, transactions) against SQL injection — whitelisted sort columns and cast limit/offset values
* [security] Scoped dashboard metrics and referral queries to the current affiliate to prevent cross-affiliate data exposure
* [security] Required authentication and validated notice types for admin-notice dismiss requests
* [security] Hardened remote-file import — URL validation (blocks SSRF via IPv6, 0.0.0.0 and javascript: URLs), server-side MIME checks, download size cap, and CSV formula-injection stripping
* [security] Capped export row counts and cleaned up temporary export files
* [security] Returned consistent affiliate IDs from authentication to prevent identity mismatches
* [security] Validated user role against an allowlist and stopped over-sanitizing raw passwords
* [security] Prevented duplicate and self-referral commissions with an idempotency guard
* [security] Replaced unsafe HTML injection with safe rendering to prevent XSS in the admin interface
* [fix] Fixed inverted success/error result when deleting a referral
* [fix] Fixed setup wizard rendering before saved values finished loading
* [fix] Aligned 'unpaid' referral status with the canonical 'approved' status
* [fix] Fixed missing type field when importing referrals
* [chore] Bumped dependencies and refreshed documentation

= v3.5 - 2026-06-17 =
* [new] Apply a product's commission percentage to referral links when that product is purchased
* [imp] Redesigned the recurring commission settings screen for clarity
* [imp] Hide commission amount fields when commission type is set to Default or Disable
* [imp] Show the Generate URLs block only after a URL has been generated
* [imp] Updated Pro screen copy
* [fix] Fixed broken email verification link on the first send-verification email
* [fix] Fixed verification/notification emails not being sent when an affiliate is enabled, and to the admin
* [fix] Fixed layout breaking with long site or product names
* [fix] Fixed login and registration forms rendering oversized
* [fix] Fixed mathematically incorrect commission pie chart
* [fix] Fixed mathematically invalid Visits vs Referral chart
* [fix] Fixed fixed-commission amounts exceeding the product price not being handled
* [chore] Bumped JS and PHP dependencies (June 2026)

= v3.4 - 2026-05-22 =
* [new] Added resend verification email functionality with countdown timer for unverified affiliates
* [new] Added GroupField component for grouped setup wizard fields with sub_fields support
* [new] Added email verification message for unverified affiliates during registration
* [new] Added AI chatbot integration
* [imp] Combined commission type and amount fields in setup wizard with inline descriptions
* [imp] Updated email verification handling in registration and pending approval templates
* [imp] Wired group_field in FieldRenderer and simplified SectionRenderer
* [fix] Fixed product commission lookup to use variation ID for variable products
* [fix] Fixed group_field sub_fields expansion in wizard path cache and defaults
* [fix] Fixed placeholder support in NumberField
* [fix] Fixed default value pre-selection in SelectField when value is empty
* [fix] Fixed fieldContainerClassName support in TextField
* [fix] Fixed permission callback for resend verification email REST endpoint
* [fix] Fixed group_field type support in PHP setup wizard handler
* [fix] Removed testing widget from dashboard initialization
* [com] Added OneListing theme styles for affiliate login tabs

= v3.3.1 - 2026-05-11 =
* [fix] Preserve formData when dynamic fields regenerate

= v3.3 - 2026-05-05 =
* [new] Added referral type badges in the referrals table for all referral types
* [new] Added recurring commission settings section
* [new] Added EasyCommerce support for pay-with-credits
* [new] Added Enter key support for search filters
* [new] Setup wizard: added platform setup field with multi-platform support
* [imp] Renamed Migration page to Export and removed Import tab
* [imp] Enhanced affiliate profile settings with profile image support
* [imp] Made referral status colors dynamic
* [imp] Removed affiliate name column from visits table
* [imp] Improved setup wizard welcome screen and activation redirect guards
* [fix] Fixed pay-with-credits fallback to Stripe when credits are unavailable
* [fix] Fixed double-discount and zero-fee bugs in pay-with-credits
* [fix] Fixed pay-with-credits order total, transaction ID, and partial credit deduction
* [fix] Fixed recurring commission type validation in referral processing
* [fix] Fixed recurring commission settings key mismatch and subscription renewal handler
* [fix] Fixed affiliate registration date displaying in UTC instead of site timezone
* [fix] Fixed minute format in time displays across all admin tables and public dashboard
* [fix] Fixed CSV export formatting issues across all report types
* [fix] Fixed CSV export compatibility with PHP 8.x
* [fix] Fixed XML export element name sanitization
* [fix] Fixed export handling for empty result sets and payables status filter
* [fix] Fixed default sort order in the transactions table
* [fix] Fixed product data serialization in referrals
* [fix] Fixed Recent Referrals screen breaking with long landing URLs
* [fix] Fixed page URL display for visit-type items in the Recent Referrals table
* [fix] Fixed top-selling products showing no data on the summary page despite data existing
* [fix] Fixed plugin activation redirect and default options on fresh install
* [fix] Fixed incomplete plugin data cleanup on uninstall
* [fix] Fixed legacy migration detection ignoring empty option values
* [security] Enforced admin permission check on the affiliate assignment endpoint

= v3.2 - 2026-03-15 =
* [new] Added Codexpert CRM integration for affiliate management
* [new] Added settings page reload state tracking
* [new] Added onClick prop support to button field components in setup wizard
* [new] Setup wizard now sends form values when completing
* [new] Added CRM fields to wizard completion page
* [new] Added complete_wizard action hook for custom integrations
* [fix] Made CRM email field optional in setup wizard
* [fix] Fixed margin for last child elements in setup wizard
* [fix] Added multi-site support using is_plugin_active() method
* [fix] Added plugin active check for multi-site environments
* [imp] Updated npm dependencies

= v3.1 - 2026-03-12 =
* [new] Added affiliate role assignment for existing users
* [imp] Updated process time in transactions table
* [imp] Updated requested date in transactions table
* [imp] Updated dependencies and language template
* [fix] Improved commission calculation and return values
* [fix] Return dash for empty time values

= v3.0.5 - 2026-03-09 =
* [remove] Legacy loader issue fixed

= v3.0.0 - 2026-03-08 =
* [major] Complete plugin rebuild - frontend rewritten in React JS for a faster, more responsive experience
* [new] Brand new Admin Dashboard - redesigned from scratch with a cleaner layout, real-time program stats, and improved affiliate management workflows
* [new] Brand new Affiliate Dashboard - faster load times, cleaner UI, and a better experience for affiliates managing their links, earnings, and payouts
* [new] Stripe payout integration - affiliates can now receive automated payments via Stripe; approve and process in one click
* [imp] PayPal payout flow overhauled - faster processing, cleaner transaction logs, and more reliable payment handling
* [imp] Referral tracking engine optimized for better performance under high affiliate volume
* [imp] Commission calculation logic improved for accuracy and edge-case handling
* [imp] Documentation fully updated to reflect the new UI and features
* [fix] Various bug fixes and stability improvements carried over from the 2.x branch

= v2.17 - 2026-01-13 =
* [remove] Removed notice for the Year End sale campaign

= v2.16 - 2025-12-23 =
* [added] Added notice for the Year End sale campaign

= v2.15 - 2025-12-01 =
* [imp] Allow or disallow external affiliate URL generation
* [imp] Show referred-by info in the user review screen

= v2.14 - 2025-10-13 =
* [fix] Fixed undefined function issue in affiliate login form

= v2.13 - 2025-11-09 =
* [added] Added notice for the upcoming BFCM campaign

= v2.12 - 2025-10-13 =
* [imp] Allow existing users to register as affiliates

= v2.11 - 2025-10-13 =
* [imp] Version compatibility tested
* [fix] Fixed undefined variable issue

= v2.10 - 2025-10-09 =
* [fix] Fixed unable-to-assign-affiliate issue during registration
* [enhancement] Added affiliate confirmation email with dashboard URL
* [security] Replaced unserialize() with maybe_unserialize() to mitigate PHP object vulnerability
* [fix] Fixed affiliate list date-range issue
* [fix] Replaced php time() with wp_date('U') for proper WP date handling
* [fix] Prevent affiliates from creating external shortlinks
* [ui] Fixed affiliate registration form UI and mobile button display
* [optimize] Removed duplicate code and optimized admin.js

= v2.9.6 - 2025-09-30 =
* [fix] Fixed login redirection after registration
* [fix] Fixed affiliate creation issues during registration
* [fix] Fixed duplicate password fields
* [fix] Fixed button not displaying on mobile in affiliate login page
* [fix] Fixed required field and CSS issues for radio/checkbox fields

= v2.9.4 - 2025-06-22 =
* [imp] Version compatibility tested

= v2.9.3 - 2025-06-03 =
* [imp] Setup wizard revamped
* [fix] Tooltip fixed

= v2.9.2 - 2025-05-26 =
* [fix] Security issue fixed

= v2.9.1 - 2025-05-23 =
* [fix] Code improved

= v2.9 - 2025-05-11 =
* [fix] Fixed conversion chart warning in summary page
* [fix] Use CSV instead of JSON for file export
* [fix] Compatibility with WordPress 6.8.1

= v2.8 - 2025-04-29 =
* [fix] Setup wizard error fixed
* [fix] Console error when WooCommerce is not activated

= v2.7.2 - 2025-04-29 =
* [fix] Code improved
* [remove] WooCommerce dependency removed from plugin bootstrap to avoid fatal errors

= v2.7.1 - 2025-04-20 =
* [fix] Plugin search issue fixed

= v2.7 - 2025-04-17 =
* [add] Charts and graphs re-added to dashboard
* [imp] UI improved
* [rem] Removed admin banners
* [fix] Adjusted minimum WordPress version requirement

= v2.6.2.3 - 2025-04-17 =
* [fix] Dependency adjusted

= v2.6.2.2 - 2025-04-17 =
* [fix] Updated setup wizard

= v2.6.2.1 - 2025-04-15 =
* [fix] Updated setup wizard

= v2.6.2 - 2025-04-15 =
* [fix] Made compatible with WordPress 6.8
* [fix] Updated setup wizard

= v2.6.1 - 2025-03-20 =
* [fix] PHP 8.2 compatibility issue fixed

= v2.6 - 2025-03-16 =
* [security] Security vulnerability fixed

= v2.5.3 - 2025-02-11 =
* [fix] Stripped tags from email subject
* [fix] Allowed HTML in email body
* [add] Added %%site_title%% placeholder; removed %%site_url%%

= v2.5.2 - 2025-01-26 =
* [fix] Upgraded `pluggable/marketing` and `pluggable/plugin` packages to dev-master
* [fix] Changed HTML escape function

= v2.5.1 - 2025-01-17 =
* [fix] Vulnerability fixed and code improved

= v2.5 - 2025-01-17 =
* [fix] Vulnerability fixed

= v2.4 - 2025-01-04 =
* [fix] Vulnerability fixed

= v2.3.9 - 2024-12-08 =
* [remove] Removed promotional button from dashboard
* [imp] Updated promotional text in plugin menu

= v2.3.8 - 2024-11-25 =
* [imp] Tested WordPress 6.7.1 compatibility

= v2.3.7 - 2024-11-12 =
* [imp] Routine maintenance

= v2.3.6 - 2024-11-07 =
* [fix] Undefined array key issue fixed
* [imp] Setup wizard finishing redirection
* [add] Help and documentation buttons

= v2.3.5 - 2024-10-21 =
* [add] Added functions for URL escaping
* [imp] Corrected escaping function formats

= v2.3.4 - 2024-10-07 =
* [add] Added escaping functions

= v2.3.3 - 2024-09-26 =
* [add] Added escaping functions
* [add] Added comments for translators

= v2.3.2 - 2024-09-19 =
* [imp] Routine maintenance

= v2.3.1 - 2024-09-12 =
* [add] Added comments for translators
* [imp] Tested WordPress 6.6.2 compatibility

= v2.3 - 2024-09-09 =
* [fix] Fixed critical error
* [add] Added escaping functions
* [imp] Corrected data type formats
* [add] Added comments for translators
* [imp] Tested WordPress 6.6.1 compatibility

= v2.2.3.3 - 2023-09-13 =
* [imp] Notice removed

= v2.2.3.2 - 2023-09-05 =
* [imp] CSS and JS minified

= v2.2.3 - 2023-09-05 =
* [fix] PHP and WordPress version compatibility tested

= v2.2.2 - 2023-02-27 =
* [fix] Install time added

= v2.2.2 - 2022-09-04 =
* [fix] Bug fixes

= v2.2.1 - 2022-03-16 =
* [fix] Bug fixed regarding templates

= v2.2.0 - 2022-01-06 =
* [imp] Affiliate dashboard redesigned
* [fix] Stripe connect issue fixed
* [fix] Commission calculation fixed
* [add] Coupon-based affiliate detection
* [add] Email verification
* [add] Migration tool

= v2.1.0 - 2021-08-01 =
* [fix] Generating shortlinks of external URLs is disabled

= v2.0.1 - 2021-06-27 =
* [fix] Version bumped due to a compatibility issue. No changes made in the plugin.

= v2.0.0 - 2021-06-22 =
* Initial release
