=== فروش‌ساز | افزایش فروش ووکامرس ===
Contributors: sitosaaz
Tags: woocommerce, cross-sell, upsell, cart, conversion
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

فروش‌ساز به فروشگاه ووکامرس کمک می‌کند با پیشنهاد محصولات مکمل در صفحه محصول، سبد خرید و پس از افزودن محصول، مبلغ سفارش را افزایش دهد.

== Description ==

فروش‌ساز پیشنهاد محصولات مکمل را بدون دست‌کاری مسیر اصلی افزودن به سبد ووکامرس نمایش می‌دهد.

Free features:

* Product-page cross-sell recommendations.
* Cart-page cross-sell recommendations.
* Bottom Sheet recommendations after a successful primary add-to-cart.
* Simple-product one-click add-to-cart.
* Variable-product option validation before add-to-cart.
* Support for non-Latin and URL-encoded variation attributes.
* Local View → CTA → Add → Order → Paid Purchase attribution analytics.
* WooCommerce HPOS compatibility declaration.
* Shortcode: `[sscs_recommendations context="product"]`.
* No external telemetry and no remote tracking service.
* Dashboard Pro reminder appears only after 3 days, never on the storefront, and automatically pauses for 7 days after a view or 30 days after dismissal.

The plugin first uses the cross-sells configured on WooCommerce products. When automatic fallback is enabled and no manual cross-sells are available, it can fill recommendations with WooCommerce related products.

The Free version is not time-limited and does not disable existing functionality after a quota or trial period.

== Installation ==

1. Install and activate WooCommerce.
2. Upload the plugin ZIP in Plugins → Add New → Upload Plugin, or install it from WordPress.org when available.
3. Activate "فروش‌ساز | افزایش فروش ووکامرس".
4. Open WooCommerce → فروش‌ساز to configure display and analytics settings.
5. Assign Cross-sells to products in WooCommerce product data for the most intentional recommendations.

== Frequently Asked Questions ==

= Does this replace WooCommerce add-to-cart? =

No. The main product form remains WooCommerce-native. Custom AJAX is used only for recommendation cards.

= Does it support variable products? =

Yes. Variable recommendation cards validate the selected variation against WooCommerce before enabling the add button.

= Does it work with Persian or other non-Latin attributes? =

Yes. Canonical attribute keys and values are preserved, including URL-encoded attributes used by WooCommerce.

= Does the plugin send analytics to Sitosaaz? =

No. Free analytics are stored locally in the WordPress database and are not transmitted to an external service.

= What happens if analytics are disabled? =

Recommendations continue to work. Funnel-event recording stops.

== Privacy ==

This plugin does not send visitor, order, or store data to Sitosaaz or another external service.

When analytics are enabled, the plugin stores local cross-sell events in a custom WordPress database table. Stored fields can include event type, recommended product ID, source product ID, recommendation context, an internally hashed WooCommerce session identifier, order ID, quantity, attributed amount, and timestamp. The plugin automatically removes event rows older than 18 months.

Uninstalling the plugin removes its settings, scheduled cleanup hook, analytics options, and its own analytics table.

== Screenshots ==

1. Product-page cross-sell recommendations.
2. Post-add Bottom Sheet recommendations.
3. Cross-sell analytics dashboard.
4. WooCommerce cross-sell settings.

== Changelog ==

= 1.0.0 =
* Public Free release branded as فروش‌ساز | افزایش فروش ووکامرس.
* Product-page and cart cross-sell recommendations with Bottom Sheet support.
* Variable-product validation with non-Latin attribute support.
* Local attribution analytics and WooCommerce HPOS compatibility.
* Added a duplicate-safe fallback for custom/Elementor WooCommerce single-product templates.
* Added a non-storefront Pro upgrade popup inside the WordPress Dashboard after 3 days.
* The Pro popup pauses for 7 days after being shown and for 30 days when dismissed.
* Preserved the existing plugin slug, settings, analytics data, and runtime identifiers for safe upgrades.
