=== Paapi Product Search for Amazon ===
Contributors: paapiplugin
Tags: amazon affiliate, amazon product search, amazon product box, creators api, amazon associates
Requires at least: 5.8
Tested up to: 7.0
Stable tag: 2.21.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Full Amazon affiliate plugin for WordPress: searchable product grids, category pages, and live on-site search. Start free with the Managed API (Beta).

== Description ==

**Paapi Product Search for Amazon is a full Amazon affiliate plugin for WordPress.** Build searchable category pages and responsive product grids, then customize the look to match your theme without touching code. Add-ons extend it further: Product Boxes for individual product showcases and Comparison Tables for side-by-side buying guides (each add-on is $19/yr and requires Premium).

What sets it apart is live, on-site Amazon search. Add one shortcode and visitors search, filter, and browse Amazon's catalog without leaving your page. Every product is automatically tagged with your Associate ID, and they click through to buy. You earn commissions on whatever they decide to buy, not just the products you manually linked.

One shortcode. No ASIN hunting. Works in minutes.

**New: start with no Amazon API credentials at all.** Our Managed API (Beta) returns live Amazon product results without setting up your own Amazon API credentials yet. Get started in 30 seconds, 20 searches a day and 600 a month free, and your Amazon Associate tag always stays yours.

Already approved for Amazon's APIs? Bring your own Creators API (OAuth 2.0) or PA-API v5 credentials instead. Both paths live behind one toggle, so your site keeps earning through Amazon's API transitions without rebuilding your pages.

https://www.youtube.com/watch?v=9KI2sAaGGK8

= Why Affiliates Use It =

* **Earn on every Amazon search, not just manual links** - visitors discover products you never had to curate
* **Keep visitors on your site** - live Amazon product search reduces bounce rates
* **Fast by default** - build-time server-side rendering (SSR) means instant page loads
* **Smart caching** - search results cached 30 min, product data cached 1 hr, so your API quota stays healthy
* **Three ways to connect** - our Managed API (Beta, no credentials), Amazon Creators API (OAuth 2.0, recommended), or legacy PA-API v5

= Free Features =

* **Managed API (Beta)** - real-time Amazon search with no Amazon API credentials needed yet and no AWS keys; 20 searches/day and 600/month free, your Amazon Associate tag stays yours
* Live Amazon product search with autocomplete suggestions
* **Top Products Grid** - with no query or category set, [psfa_search] shows a rotating grid of popular Amazon products across categories instead of an empty search box (the Top Products on Empty State setting, on by default); an instant Amazon storefront on any page
* Brand, price range, condition, merchant, and availability filters (Price Range, Condition, Merchant, and In-Stock apply when you bring your own Amazon credentials; see the Managed API FAQ)
* Sorting: Relevance and Customer Reviews everywhere; price sorting, Newest Arrivals, and Featured apply when you bring your own Amazon credentials
* Grid layout with responsive mobile-first design
* 5 categories (Electronics, Books, Fashion, Toys & Games, Home & Garden)
* Up to 50 products (5 pages) with infinite scroll, Load More, or no pagination
* Customizable product count (2-20 per page)
* Visual shortcode builder - no coding required
* Cache management page with usage monitoring
* Appearance customization: Neutral base color, orange accent, card style, border radius

= Premium Features ($39/yr) =

* **All 26 Amazon categories** - cover your entire niche, not just 5
* **Extended pagination** - up to Amazon's 10-page ceiling (up to 100 products) with your own credentials; the Managed API (Beta) serves up to 5 pages
* **List layout** - vertical display for detailed product comparisons
* **Full appearance control** - 5 base colors, 17 accent colors, 5 card styles, 5 border radius levels, dark mode, 16 fonts (15 Google Fonts + system default)
* **Deal badges** - Lightning Deal, Best Deal, Prime Exclusive, Low Stock warning, discount percentage, deal countdown timer (with your own Amazon credentials)
* **Product badges** - Prime, Best Seller rank (#1-100)
* **Prime and Deals filters** - let visitors find Prime-eligible products and active deals
* **White-label mode** - remove all PSFA branding for a fully custom experience
* **Button and display customization** - custom button text, hide Amazon icon, hide category banner

= Add-ons ($19/yr each, requires Premium) =

* **Product Boxes** - display individual Amazon products anywhere with shortcodes. Search-to-Save workflow, feature bullets, winner badges
* **Comparison Tables** - side-by-side product comparisons with winner badges, star ratings, responsive mobile layouts
* **Analytics** - track searches, clicks, impressions, and filter usage. Dashboard with charts, date picker, CSV/JSON export. Privacy-first, no cookies or PII

= How It Works =

1. Install and activate the plugin
2. Choose how to connect: turn on our Managed API (Beta) for instant search with no credentials, or enter your own Creators API or PA-API v5 credentials
3. Add `[psfa_search]` to any page or post
4. Your visitors search Amazon products and you earn commissions on every purchase

https://www.youtube.com/watch?v=PVvKdrpOg80

= Requirements =

* WordPress 5.8 or higher
* PHP 7.4 or higher
* cURL extension enabled
* An Amazon Associates account. For product data, use our Managed API (Beta, no credentials required) or bring your own Creators API or PA-API v5 credentials (Access Key ID, Secret Access Key, and Associate Tag)

= Getting Amazon API Credentials =

**Using the Managed API (Beta)?** You only need a free Amazon Associates account - no Amazon API credentials needed yet and no AWS keys. The steps below apply only if you choose to bring your own credentials instead.

To use this plugin, you'll need to:

1. Sign up for the [Amazon Associates program](https://affiliate-program.amazon.com)
2. Apply for API access at [Creators API](https://affiliate-program.amazon.com/creatorsapi) or [Product Advertising API (PA-API v5)](https://affiliate-program.amazon.com/assoc_credentials/home) We support both!
3. Once approved, you'll receive your Creators API Client ID and Client Secret (or, for PA-API v5, an Access Key ID and Secret Access Key)
4. Your Associate Tag is your Amazon Associates ID

= Privacy & Security =

* Your own Amazon API credentials (Creators API or PA-API v5) are encrypted at rest, and the raw key never reaches the browser
* On the Managed API (Beta), calls are server-to-server from your WordPress site to our proxy, which returns live Amazon product data tagged with your Associate ID. We never receive your site visitors' IP addresses or personal data
* The Managed API uses a third-party Amazon product-data provider on the back end. Full detail is in our Privacy Policy and Managed API Usage Terms at paapiplugin.com
* The optional product-update email opt-in is the only marketing data we collect, and only if you check the box. It never affects your API key or service
* All requests use secure HTTPS connections

== Installation ==

= Automatic Installation =

1. Go to **Plugins → Add New** in your WordPress admin.
2. Search for "Paapi Product Search for Amazon" (or upload the ZIP from WordPress.org once approved).
3. Click **Install Now** and then **Activate**.

= Manual Installation =

1. Upload the `paapi-product-search-for-amazon` folder to `/wp-content/plugins/`.
2. Activate the plugin through the **Plugins** menu in WordPress.
3. Go to **Settings → Paapi Product Search for Amazon**.
4. Enter your Amazon API credentials (Creators API recommended, or PA-API v5), or enable the Managed API for no-credential setup.
5. Add the shortcode `[psfa_search]` to any page or post.

= Configuration =

https://www.youtube.com/watch?v=boIgal54T1c

1. Navigate to **Settings → Paapi Product Search for Amazon** in your WordPress admin.
2. Select your **Authentication Type**:
   - **OAuth 2.0 (Creators API)** - Recommended for new users
   - **AWS Signature V4 (PA-API)** - Legacy authentication method
3. For **OAuth 2.0 (Creators API)**:
   - Enter your **Client ID** and **Client Secret** from Creators API
   - Enter your **Credential Version** (typically "1")
   - Select your **Auth Region** and **Marketplace**
4. For **AWS Signature V4 (PA-API)**:
   - Enter your **Access Key ID** and **Secret Access Key**
5. Enter your **Associate Tag** (your Amazon Associates ID).
6. Click **Test Connection** to verify your credentials work.
7. Click **Save Settings**.
8. (Optional) Customize appearance in the Appearance tab (base color, accent, radius, dark mode, font).

== Frequently Asked Questions ==

= How is this different from other Amazon affiliate plugins? =

Most Amazon plugins (AAWP, AzonPress, AmaLinks Pro) display products you already know about - you pick ASINs, embed them, done. This plugin adds live search. Visitors find products themselves, browse, filter, and click through to buy. You earn commissions on products you never had to manually curate. Use it alongside your existing plugin or replace the ASIN-hunting workflow entirely.

= Do I need Amazon API credentials to use this plugin? =

No. Our Managed API (Beta) runs live Amazon product search with no Amazon API credentials needed yet and no AWS keys. You still need a free Amazon Associates account so commissions are tagged to you, and your Amazon Associate tag is always yours. If you already hold Creators API or PA-API v5 credentials, you can bring your own instead with one toggle in the plugin admin.

= Do I need an Amazon Associates account? =

Yes, a free Amazon Associates account is always required so commissions are tagged to you. For product data you can use our Managed API (Beta, no credentials needed) or your own Creators API (or legacy PA-API v5) credentials. Either way, your Associate Tag tags every product link with your affiliate ID.

= How do I get Amazon API credentials? =

1. Sign up for [Amazon Associates](https://affiliate-program.amazon.com)
2. Apply for [Creators API](https://affiliate-program.amazon.com/creatorsapi) (recommended) or [PA-API v5](https://affiliate-program.amazon.com/assoc_credentials/home) access
3. Enter your credentials in the plugin settings and click Test Connection

= Will this slow down my site? =

No. The frontend uses build-time server-side rendering (SSR) - the initial HTML is pre-rendered, so the first paint is instant. Smart caching (30 min for searches, 1 hr for products) means repeat visits load in milliseconds. Your API quota stays healthy and your pages stay fast.

= What's included in the free version? =

The free version is a real product, not a crippled trial. You get live Amazon search with autocomplete, 5 categories, 50 products, brand/price/condition filters (price and condition filters apply when you bring your own Amazon credentials), sorting, infinite scroll, caching, responsive grid layout, and a visual shortcode builder. Premium adds all 26 categories, 100 products, deal badges (with your own Amazon credentials), full appearance customization, list layout, and white-label mode.

= Can visitors see products without searching first? =

Yes. With no query and no category set, [psfa_search] shows the Top Products Grid: a rotating grid of popular Amazon products across categories instead of an empty search box, so any page becomes an instant Amazon storefront. This is the Top Products on Empty State setting, on by default. To force the grid on when that setting is off, use [psfa_search mode="top"]. If you set a category, it shows popular products from that category instead. Either way, visitors can search or filter from there and every product link carries your Amazon Associate tag.

= Can I customize how it looks on my site? =

Yes. The plugin has a 6-axis appearance system. Free users get the Neutral base with orange accent. Premium users control all 6 axes: base color (5 options), accent color (17 options), card style (5 presets), border radius, dark mode, and font (15 Google Fonts + system default). The 6-axis system matches any WordPress theme.

= Does it work with caching plugins? =

Yes, but you may need to exclude pages with the `[psfa_search]` shortcode from full-page caching, since the search functionality requires dynamic content.

= Can I use it on multiple sites? =

Yes. Each site needs its own license and Amazon API credentials.

= What happens if Amazon changes or retires the PA-API? =

We recommend the Creators API (OAuth 2.0), Amazon's current product API, or our Managed API (Beta), which needs no credentials at all. PA-API v5 (AWS Signature V4) is Amazon's older method; if you still have working PA-API credentials the plugin continues to support them. You can switch between any of these in Settings without rebuilding your pages, so your site keeps earning through Amazon's API transitions.

= Do I need to manually maintain product lists or hunt for ASINs? =

No. That is the point of search. Visitors type what they want and see live Amazon results filtered by brand, price, and condition. You never need to pick ASINs or keep a product list updated. Every click still carries your Associate tag, so you earn on whatever they decide to buy.

= Why don't I see the Condition, Merchant, and In-Stock filters on the Managed API? =

On the Managed API path, the managed search data does not include per-item condition (new/used/refurbished), seller/merchant, or stock-availability detail, so the Condition, Merchant, and In-Stock filters would have no effect. To avoid showing controls that do nothing, they are hidden automatically when you use the Managed API. These filters remain available when you connect your own Amazon credentials (Creators API or PA-API v5), where Amazon provides that data.

= Why don't I see the Newest Arrivals and Featured sort options on the Managed API? =

On the Managed API path, the managed search data does not include per-item release dates, so Newest Arrivals has no signal to sort by, and Featured matches the default Relevance order. To avoid offering sorts that do nothing, both are hidden automatically on the Managed API. They remain available when you connect your own Amazon credentials (Creators API or PA-API v5). The Customer Reviews sort remains available on the Managed API and is applied by Amazon's own search when results are fetched.

== Screenshots ==

1. Live Amazon product search on your page, so visitors browse without leaving for Amazon.com (Free feature)
2. Let visitors compare Amazon products side by side in a scannable list view (Premium feature)
3. Turn every Amazon search into guided discovery with autocomplete suggestions as visitors type
4. Match any site palette with dark mode so your search feels native to your theme
5. Earn on mobile traffic with a responsive layout that adapts to every screen
6. Admin: Connect your Amazon Associates account in minutes so every click carries your tag
7. Admin: Dial in base color, accent, card style, radius, dark mode, and font with live preview
8. Admin: Control what visitors see with display options and product badge toggles
9. Admin: Generate the shortcode you need without touching code
10. Admin: Monitor cached searches and products at a glance and clear them anytime

== Changelog ==

= 2.21.4 =
* Maintenance: Internal updates and minor fixes.

= 2.21.3 =
* Improvement: Added a full setup walkthrough video to the Features tab.
* Improvement: Updated the Creators API credential setup guide video.

= 2.21.2 =
* Maintenance: Updated the bundled Freemius SDK (licensing and plugin-update framework).

= 2.21.1 =
* Fix: The Manage Credentials admin tab now opens to the currently-activated API path.

= 2.21.0 =
* New: Before activating the Managed API (Beta), you now review a short acknowledgement of how the Managed path sources Amazon data and confirm it with a required checkbox. Your acknowledgement is recorded with the signup.
* Improvement: The Managed API (Beta) signup panel was reorganized into a single, clearer setup card, grouping the acknowledgement, email field, and email opt-in together.

= 2.20.0 =
* Compliance: On the Managed API path, product price and availability are no longer displayed. The buy button is now a fixed "Check price on Amazon" call-to-action that sends visitors to Amazon for the current price, keeping this path aligned with Amazon's Associates program requirements. Bring-your-own-credentials paths (Creators API and PA-API) are unchanged and still show price.
* Compliance: On the Managed API path, the price range filter and price sorting options are hidden, since price is not shown on that path.
* Admin: When the Managed API is active, the button text setting is locked to the compliant call-to-action with an explanatory notice.
* Fix: Switching the active API path (for example from your own credentials to the Managed API) now clears the search and product cache, so previously cached prices can no longer appear on the Managed API path.

= 2.19.1 =
* Improvement: The Managed API 80% usage warning can now also reach you by email through our newsletter (for sites opted in to email updates), in addition to the in-dashboard notice.

= 2.19.0 =
* New: Managed API usage warning. When you reach 80% of your monthly Managed API searches, the plugin shows an admin notice and sends one heads-up email. Free sites get an upgrade prompt; Premium sites get a reminder that switching to your own Amazon credentials removes the monthly cap.
* Improvement: The plugin now sends your site URL to the Managed API at signup so usage can be attributed to your site. No end-visitor data is sent.

= 2.18.0 =
* Improvement: Premium users browsing the Top Products Grid with their own Amazon credentials (Creators API or PA-API) now load more pages of results instead of stopping after the first set. The grid fetches additional products as you browse, up to Amazon's page limit. The Managed API and free tier are unchanged.

= 2.17.1 =
* New: The in-plugin Features admin page now lists the Top Products Grid and Managed API (Beta) free features, and the storefront filter list now includes availability.
* Improvement: Documentation and listing copy updates for the Managed API and Top Products Grid.

= 2.17.0 =
* New: Managed API option in Credentials settings. Real-time Amazon product search without setting up your own Amazon API credentials. Get started in 30 seconds, 20 searches/day free on the free tier, your Amazon Associate tag stays yours.
* New: 3-tab Credentials UI (Managed API, Creators API, PA-API v5). Existing customers land on their configured tab with zero churn.
* New: Encrypted at-rest storage for managed API keys (AES-256-GCM). The raw key never reaches the browser.
* New: Per-month usage panel for managed-API users (current month, last 7 days, recent errors).
* New: Automatic failover to bring-your-own-credentials when the managed API has an outage, if both are configured.
* New: Optional product-update email opt-in in Credentials settings. When you request a Managed API key, an unchecked-by-default checkbox lets you subscribe to product tips and updates. Leaving it unchecked subscribes you to nothing. Your Amazon Associate tag is never affected either way.
* Improvement: Admin banner and email notifications when the managed API hits a quota, auth, or outage state. Visitor-facing search returns empty per WordPress.org compliance.
* Improvement: The Managed API is now labelled "Beta" in the Credentials UI so its status is clear while we expand capacity.
* Improvement: WordPress.org Plugin Check compliance fixes for a cleaner, standards-aligned codebase.

= 2.16.0 =
* Premium: discount filters available as shortcode attributes (`min_saving_percent`, `has_deal`)

= 2.15.3 =
* Fix: Lowercase category names in [psfa_search] shortcode (e.g. category=electronics) now resolve identically to canonical-cased names. Previously triggered a premium-category gate after clicking the search reset button.
* Fix: Premium-category upgrade prompt now renders as a styled card instead of escaped HTML markup. Backend ships structured data; frontend renders via shadcn Alert.
* Improvement: pagination and sort shortcode attributes now accept any case (Load_More, LOAD_MORE, load_more all work). Search query and brand attributes remain case-sensitive (Amazon search semantics).

= 2.15.2 =
* Improved: Test Connection now surfaces full diagnostic details (HTTP status, Amazon error code, request ID, environment versions) when authentication fails. Failures include a Copy diagnostic button to streamline support cases. The plugin secret is never included in the diagnostic block.

= 2.15.1 =
* Fixed: Test Connection for Creators API v3.x credentials. The "Test Connection" admin button was using the legacy v2.x Cognito endpoint regardless of credential version, causing a misleading invalid_client error for valid v3.1/3.2/3.3 credentials. Test Connection now routes by credential version and matches the runtime OAuth path.

= 2.15.0 =
* Fixed: Creators API "invalid_client" token error when using v3.x credentials. Plugin now supports v2.x and v3.x credentials side-by-side, routing the OAuth token request by major credential version.

= 2.14.1 =
* Improved: WordPress.org listing - rewritten tags, description, features, and FAQ for clarity and discoverability

= 2.14.0 =
* Added Mailchimp email drip integration for new user onboarding
* Server-side subscribe proxy for secure Mailchimp API communication
* Freemius opt-in hook sends new user emails to onboarding sequence

= 2.13.2 =
* New: Leave a review hook when credentials configured

= 2.13.1 =
* Improved: WordPress.org listing - rewritten tags, description, features, and FAQ for clarity and discoverability

= 2.13.0 =
* New: Analytics addon support - track searches, clicks, impressions, and filter usage with admin dashboard

= 2.12.3 =
* Improved: Frontend search and pagination stability
* Fixed: Potential race condition when changing search queries rapidly

= 2.12.2 =
* New: Analytics add-on support - track searches, clicks, impressions, and filter usage with an admin dashboard
* Fixed: Admin menu now appears as a top-level menu item in the WordPress sidebar

= 2.12.1 =
* Fixed: Sort filter (NewestArrivals/AvgCustomerReviews/Featured) not updating results when query + brand filter are both active
* Fixed: Frontend showing stale results briefly when search query changes
* Fixed: Cache page time formatting showing raw hours instead of days/weeks/months

= 2.12.0 =
* Improved: Price range filter now uses a dual-thumb slider in a popover, consistent with other filter controls

= 2.11.0 =
* New: API response caching - search results cached 30 minutes, product data cached 1 hour (WordPress transients)
* New: Unified product cache across all addons (single cache per ASIN)
* New: Dedicated Cache management page with cached items table, sorting, filtering, and creation timestamps
* New: Auto-invalidation when marketplace or associate tag changes
* Improved: Addon AJAX uses `get_items()` instead of `search_items()` for known-ASIN lookups
* Improved: Addon premium enforcement (admin notice + shortcode gate + AJAX gate + no frontend assets)

= 2.10.0 =
* Major: Complete UI modernization with React 19, shadcn/ui components, and Tailwind CSS v4
* Major: Entire frontend rebuilt in React with build-time server-side rendering (SSR) for instant loading
* Major: New 6-axis appearance system replacing the old fixed theme + color picker model
* New: 5 base color palettes (Neutral free, Stone, Slate, Zinc, Gray premium)
* New: 17 accent colors from Tailwind's chromatic palette
* New: 5 card styles (Vega, Nova, Maia, Lyra, Mira)
* New: 5 border radius levels (None, Small, Medium, Large, Full)
* New: Dark mode toggle for any base color
* New: 15 Google Fonts plus system default for typography customization
* New: Hide Amazon Icon toggle for product cards
* New: Unified Appearance page replacing separate Themes and Customization pages
* New: Product Boxes add-on fully rendered with React (was vanilla JS)
* New: Comparison Tables add-on fully rendered with React (was vanilla JS)
* New: shadcn/ui admin components (Dialog, AlertDialog, Switch, Slider, Sonner toasts)
* Improved: Admin UI with react-router-dom v7 navigation
* Improved: 188 tests passing (Vitest + React Testing Library)
* Improved: All styling via Tailwind CSS v4 utility classes (754-line style.css removed)
* Removed: css-generator.php (replaced by static theme CSS files)
* Removed: Old fixed themes (Ocean Blue, Modern, Minimal, Amazon Inspired) replaced by 6-axis system
* Removed: Per-theme color picker customization (replaced by accent color axis)
* Removed: Card Layout feature
* Removed: Vanilla TypeScript frontend widgets (replaced by React components)
* Removed: PHP frontend fallback (React-only rendering)

= 2.9.2 =
* New: `count` shortcode attribute to control product display count (2-20)
* New: Product count slider in Shortcode Builder (shows when pagination="none")
* New: "Flexible Product Count" added to Features list

= 2.9.1 =
* Refactor: HTML structure consolidation - single source of truth for product cards
* New: `psfa_render_product_card()` function for consistent product card rendering
* Improved: AJAX now returns pre-rendered HTML + JSON (progressive enhancement)
* Improved: Frontend bundle size reduced from ~13KB to ~10KB
* Improved: Addon hooks now work automatically for AJAX-loaded products
* New: Design token system with CSS custom properties
* Improved: Tailwind CSS v4 migration complete
* New: Visual regression testing with 26 Playwright tests

= 2.9.0 =
* Major: Full React+TypeScript migration complete
* New: React admin UI with react-router navigation (9 pages)
* New: TypeScript frontend widgets (Autocomplete, InfiniteScroll, Countdown, FiltersToggle, ClearButton)
* New: Unified `/src` project structure
* New: Shared utility library
* Improved: 85 tests passing (Vitest + React Testing Library)
* Improved: Type safety across entire codebase

= 2.8.3 =
* Improved: Welcome video ID now filterable via `psfa_welcome_video_id` hook

= 2.8.2 =
* Improved: Disabled browser autocomplete on API credentials inputs

= 2.8.1 =
* New: Welcome section with setup video for new users on API Credentials page
* Improved: Video player with custom thumbnail and auto-reset on finish

= 2.8.0 =
* New: White-label mode - Premium users can remove "Powered by PSFA" branding
* New: "Powered by PSFA" branding link on frontend search results
* New: White-label toggle in Layout → Display Options (Premium)

= 2.7.0 =
* New: Comparison Tables add-on support - create product comparison tables with winner badges
* New: Winner Highlighting badges (Best Value, Editor's Choice, Best Rated, Budget Pick, Premium Pick)
* New: Responsive table options - stack (cards) or scroll on mobile devices
* New: Custom button text support for comparison tables
* Improved: Documentation updates for add-on shortcode attributes

= 2.6.0 =
* New: Add-on support infrastructure - hooks and filters for extending plugin functionality
* New: Product Boxes add-on compatibility - display individual Amazon products with shortcodes
* New: Admin navigation system for add-on sections
* Improved: Plugin architecture to support modular add-ons

= 2.5.0 =
* Improved: CSS architecture refactored - base styles in style.css, themes contain only color overrides
* Improved: Product card alignment - titles now use line-clamp for consistent card heights
* Improved: Title hover tooltip shows full product name when truncated
* New: Countdown badge shimmer animation effect for time-limited deals
* New: Theme-specific badge colors for all themes (Ocean Blue, Modern, Minimal, Dark, Amazon Inspired)
* Fixed: Badge color overrides now properly apply in all themes

= 2.4.0 =
* New: Display Options settings - Hide Search Bar, Hide Filters, Hide Category Banner toggles in admin
* New: Shortcode overrides - Display options can be overridden per-page using shortcode attributes
* New: Shortcode builder - Added Hide Category Banner toggle to Display Options card
* Improved: Settings priority system - URL params > shortcode attributes > admin settings
* Fixed: Admin settings now properly apply when no shortcode attributes are provided

= 2.3.1 =
* Fixed: Price filter consistency - Initial page load now sends minPrice/maxPrice to Creators API
* Fixed: Creators API 404 handling - No results now gracefully shows empty state instead of error

= 2.3.0 =
* New: OffersV2 API Migration - Full migration from OffersV1 to OffersV2 for enhanced deal data
* New: OAuth 2.0 / Creators API authentication support with admin UI selector
* New: Test Connection button in credentials settings to validate API credentials
* New: Auth type selector - Choose between OAuth 2.0 (Creators API) or AWS Sig V4 (legacy PA-API)
* New: Has Deal filter - Filter products to show only items with active deals
* Improved: Badge & Deal Settings moved to Layout section with consistent UI
* Improved: Badge toggles now match Filter Visibility design (2-column grid, clickable rows)

= 2.2.1 =
* Added: Info tooltips throughout admin settings for better guidance
* Improved: Admin interface polish and styling refinements

= 2.2.0 =
* Added: New Tailwind CSS admin interface with modern styling
* Added: Comprehensive test suite (256 tests, 64% coverage)
* Fixed: Demo panel styling and layout issues
* Fixed: Card selection border states in admin
* Improved: WordPress.org compliance - removed CDN dependencies
* Improved: Code quality and maintainability

= 2.1.3 =
* Added: Stock status filter (In Stock Only, All Items, Out of Stock Only)
* Added: Filter visibility settings - choose which filters to show/hide in the search interface
* Fixed: Filter parameters now correctly propagate to URL on form submission

= 2.1.2 =
* Fixed: Price sorting now correctly handles products with sale/original prices
* Fixed: Sorting accuracy when brand filter is applied
* Changed: Renamed "Pro" to "Premium" in upgrade notices

= 2.1.1 =
* Changed: Shortcode renamed from [product_search_for_amazon] to [psfa_search] for WordPress.org compliance
* Updated: All documentation and shortcode builder to use new shortcode name

= 2.1.0 =
* Added: Product Badges premium feature card in Features tab
* Added: Shortcode Builder admin tab with visual shortcode generator
* Added: Info tooltips to Customization and Shortcode tabs for better UX
* Fixed: WordPress coding standards compliance
* Improved: Plugin zip file structure

= 2.0.6 =
* Restructured: Plugin folder organization (includes → core) for better maintainability and add-on support
* Improved: Filters now always visible when hide_search="true" shortcode attribute is used
* Fixed: Asset paths after folder restructure

= 2.0.5 =
* Fixed: White page issue on production sites when applying filters
* Fixed: JavaScript error with lightbox initialization before DOM ready
* Improved: POST form redirect now runs early via template_redirect hook for faster response

= 2.0.3 =
* Fixed: All CSS class prefixes updated to psfa- (WordPress.org compliance)
* Fixed: All option names updated to psfa_ prefix
* Fixed: All AJAX action hooks updated to psfa_ prefix
* Fixed: JavaScript localization variable renamed to psfaAjax
* Improved: Complete prefix standardization across all plugin files

= 2.0.2 =
* Fixed: Inline scripts and styles now use proper WordPress enqueue functions
* Fixed: Nonce verification now uses proper sanitization
* Fixed: All function prefixes updated to PSFA_ (4+ characters)
* Improved: WordPress.org compliance for plugin guidelines
* Updated: External services documentation
* Updated: Source code documentation for minified JS

= 2.0.1 =
* Fixed: Category limits enforced correctly in free version (5 categories)
* Fixed: Pagination limits enforced correctly in free version (5 pages)
* Fixed: Upgrade notice displays properly for premium categories
* Improved: Build system for free/premium version separation

= 2.0.0 =
* Added premium theme system with 4 additional themes (Ocean Blue, Modern, Minimal, Dark)
* Added list display mode for premium users
* Added comprehensive customization options: custom colors, button customization, card layouts, font customization
* Added all 26 Amazon categories for premium users
* Added unlimited pagination for premium users (up to Amazon's 10-page limit)
* Added hide category banner option
* Improved admin interface with tabbed navigation
* Enhanced CSS generation system for dynamic customizations
* Refined PA‑API filtering support for brand, condition, and merchant
* Stabilized the interaction between price range filters and all sort options
* Improved infinite scroll behaviour with better pagination handling
* Polished the responsive UI (mobile and desktop)
* Added comprehensive PHPUnit test suite
* Updated architecture to follow DRY/SOLID principles

= 1.5.0 =
* Introduced advanced sorting options (Relevance, Price Low → High / High → Low, Newest Arrivals, Average Customer Reviews, Featured).
* Added client‑side sorting fallbacks when PA‑API sorting is not available for a given filter combination.
* Improved integration between brand filtering and sorting so that the overall product list remains globally sorted across AJAX pages.

= 1.4.0 =
* Added support for condition and merchant filters mapped to PA‑API parameters where available.
* Improved "no products found" messaging to distinguish between genuine empty results and API errors.
* Hardened error handling for PA‑API HTTP failures and invalid parameter responses.

= 1.3.0 =
* Reworked infinite scroll to better respect Amazon's 10‑page `ItemPage` limit and to avoid repeated empty page requests.
* Added an explicit upgrade notice when the free plan's page limit is reached, with a link to upgrade to the premium version.
* Improved pagination logic to ensure filters and sorts are preserved across AJAX requests.

= 1.2.0 =
* Enhanced the price range filter with more robust parsing and inclusive min/max boundaries.
* Ensured price filtering works consistently between the initial page load and subsequent AJAX loads.
* Fixed several edge cases where items without prices or with unusual formats could slip through filters.

= 1.1.0 =
* Introduced the brand dropdown filter with dynamic options based on the current result set.
* Added autocomplete suggestions powered by a secure WordPress AJAX endpoint.
* Improved overall accessibility and keyboard navigation within the search experience.

= 1.0.2 =
* Minor bug fixes and internal refactors in preparation for the 1.1.0 feature set.

= 1.0.1 =
* Improved handling of restrictive filter combinations and "No results" cases.
* Added clearer error messaging when PA‑API credentials are missing or invalid.
* Tightened input sanitization and ensured compliance with WordPress coding standards.

= 1.0.0 =
* Initial release.
* Core product search via PA‑API v5.
* Category selection and basic brand/price filters.
* Infinite scroll and autocomplete suggestions.
* `[psfa_search]` shortcode and default responsive styling.

== Support ==

For support, feature requests, or bug reports, please visit the plugin's support forum on WordPress.org.

== Credits ==

This plugin uses the Amazon Creators API (recommended) and the Amazon Product Advertising API 5.0 (PA-API 5.0) to search and retrieve product information. A Managed API option is also available, which connects through PaapiPlugin's hosted proxy.

= Third-Party Libraries =

This plugin includes the following open-source libraries:

* **[shadcn/ui](https://ui.shadcn.com/)** - UI component library (MIT License)
* **[Radix UI](https://www.radix-ui.com/)** - Accessible UI primitives used by shadcn/ui (MIT License)
* **[Lucide React](https://lucide.dev/)** - Icon library (ISC License)
* **[Phosphor Icons](https://phosphoricons.com/)** - Duotone icon set, used for select inline SVG icons (MIT License)
* **[React](https://react.dev/)** - UI framework (MIT License)
* **[Tailwind CSS](https://tailwindcss.com/)** - Utility-first CSS framework (MIT License)

== Source Code ==

The JavaScript bundles are built from TypeScript and React source files using the tools listed below.

Build tools used:
* **Vite** - For TypeScript/React bundling and minification
* **Node.js** - Runtime environment
* **React 19** - Admin UI and frontend rendering
* **Tailwind CSS v4** - Utility-first styling
* **shadcn/ui** - Accessible UI components built on Radix UI primitives
* **Lucide React** - Icon library used by UI components
* **Phosphor Icons** - Duotone icon set (inline SVGs)

== External Services ==

This plugin connects to the following external services:

= Amazon Product APIs (Creators API and PA-API 5.0) =

This plugin uses Amazon's Creators API (OAuth 2.0, recommended) or Product Advertising API (PA-API 5.0, legacy) to search and retrieve product information when you bring your own Amazon credentials. This is the core functionality of the plugin.

* **What it does:** Searches Amazon's product catalog and retrieves product details (title, price, images, etc.)
* **When data is sent:** When a user performs a product search on your website
* **What data is sent:** Search queries, category selections, and filter parameters
* **Service provider:** Amazon.com, Inc.
* **Terms of Service:** https://affiliate-program.amazon.com/help/operating/agreement
* **Privacy Policy:** https://www.amazon.com/gp/help/customer/display.html?nodeId=468496

= PaapiPlugin Managed API (Beta) =

If you enable the optional Managed API, this plugin sends search requests to PaapiPlugin's hosted proxy, which retrieves live Amazon product data on your behalf through a third-party Amazon product-data provider. You do not need your own Amazon API credentials on this path.

* **What it does:** Returns live Amazon product search and product detail data without requiring your own Amazon API credentials
* **When data is sent:** When a visitor performs a product search on your website (sent server-to-server from your WordPress site)
* **What data is sent:** Search keywords, ASINs, filter parameters, your Amazon Associate tag, your WordPress site URL, and your WordPress server IP address. End-visitor IP addresses and personal data are not sent.
* **Service provider:** PaapiPlugin (uses a third-party Amazon product-data provider on the back end)
* **Terms of Service:** https://paapiplugin.com/api-terms/
* **Privacy Policy:** https://paapiplugin.com/privacy-policy/

= Amazon Autocomplete Suggestions =

This plugin uses Amazon's autocomplete API to provide search suggestions as users type.

* **What it does:** Provides real-time search suggestions based on user input
* **When data is sent:** When a user types in the search box (after 2+ characters)
* **What data is sent:** The partial search query text
* **Service provider:** Amazon.com, Inc.
* **Service URL:** https://completion.amazon.com/
* **Terms of Service:** https://www.amazon.com/gp/help/customer/display.html?nodeId=508088
* **Privacy Policy:** https://www.amazon.com/gp/help/customer/display.html?nodeId=468496

= Google Fonts (Premium Feature) =

Premium users can select custom fonts from Google Fonts for product display elements.

* **What it does:** Loads custom font files for typography customization
* **When data is sent:** When a page with the product search is loaded and custom fonts are configured
* **What data is sent:** Font family names
* **Service provider:** Google LLC
* **Terms of Service:** https://developers.google.com/terms
* **Privacy Policy:** https://policies.google.com/privacy

== Privacy Policy ==

How product data is retrieved depends on the connection path you choose. When you bring your own credentials, product searches use your Amazon API credentials and product data comes from Amazon's Creators API or PA-API. On the Managed API (Beta), search requests go to PaapiPlugin's hosted proxy, which retrieves product data through a third-party Amazon product-data provider rather than Amazon's official Creators API or PA-API. On that path we receive search keywords, your Amazon Associate tag, your WordPress site URL, and your WordPress server IP address, as listed in the External Services section above. We never collect, store, or transmit your site visitors' personal data on either path. Please refer to the External Services section above for details on third-party services used by this plugin.
