=== OmnifyWP eCommerce ===
Contributors: omnifywp
Tags: ecommerce, digital products, digital downloads, payment gateway, checkout
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.2
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

OmnifyWP eCommerce — Developer-first eCommerce for WordPress with secure downloads, physical and digital products, wishlists, abandoned carts, filters, and a REST API.

== Description ==

Omnify is a high-performance, developer-first eCommerce plugin for WordPress. It offers everything you need to sell all types of products—including digital files, physical goods, simple products, variable items, and bundles—manage customers, configure country-specific tax rules, establish shipping/delivery zones, and handle secure downloads.

Featuring pre-integrated global payment gateways (Stripe, PayPal, Razorpay, Alipay, WeChat Pay, SSLCommerz, Direct Bank Transfer, Cheque, and Cash on Delivery), an extensible hook-driven architecture, and a complete public REST API, it is designed from the ground up for developers who want to customize and scale their storefronts easily.

== Features ==

= 🛍️ Storefront & Checkout Experience =
* **Premium Storefront Layout**: High-end storefront grid displaying catalog items with layout toggles, cart links in filter bars, and dynamic header hero banners with brand/category title detection.
* **Storefront Quick Add**: Hovering over product images reveals a Quick Add icon that instantly adds items to the cart via AJAX, showing a 1.3-second checkmark animation and updating the cart badge count.
* **Premium Product Details Layout**: 3-column details layout with a media gallery, trust badges, features checklist, and a sticky purchase card housing format swatches and quantity inputs.
* **Smart Checkout Engine**: Frictionless single-page checkout form featuring country-first selectors, region/state handles, and a saved address autocomplete autofill dropdown.
* **Variable & Simple Products**: Switch variations dynamically with format-specific pricing, descriptions, SKUs, and variation file attachments.
* **Product Bundles**: Group multiple digital products together so a single purchase grants access to all child files.
* **Wishlist Integration**: Built-in wishlist mechanism to let users add products to their favorites list.
* **Cart Scarcity & Progress Tracker**: Real-time Cart Scarcity Countdown Timer (with sessionStorage persistence) and a Free Shipping Progress Tracker to optimize user conversions.
* **Segmented Settings Toggle Switches**: Clean, modern Yes/No segmented controls for managing setting options.

= 🔒 Secure Digital Locker & Downloads =
* **Cryptographically Signed Links**: Dynamically generated secure download links signed via SHA-256 HMAC (salted with WP auth salts) with user-defined expiry windows.
* **Direct Protected File Delivery**: Prevents resource exposure by streaming files securely using chunked read buffers without revealing actual server paths.
* **Customer Downloads Portal**: Shortcode (`[omnify_customer_downloads]`) mounting a tabbed account dashboard for file access and shipping/billing address book management.
* **Bandwidth & Attempt Logs**: Tracks all download transactions, IP addresses, download states, and server bandwidth consumption.

= 💳 Comprehensive Payment Gateways =
* **Stripe**: Credit cards, Apple Pay, Google Pay, Alipay, and Stripe Checkout.
* **PayPal Commerce**: Express Checkout, credit/debit cards, and smart payment buttons.
* **Razorpay**: Best-in-class checkout for India, supporting UPI, cards, netbanking, and wallets.
* **Alipay**: Trusted payment service for Chinese buyers.
* **WeChat Pay**: Integrated WeChat mobile payment QR code flow.
* **SSLCommerz**: Highly trusted payment gateway for Bangladesh, supporting cards, mobile banking, and netbanking.
* **Manual Payments**: Fully configurable custom instruction flows for **Direct Bank Transfer**, **Cheque Payments**, **Cash on Delivery**, and custom **Manual Payments**.

= 🔌 REST API & Extensibility =
* **Public Storefront Endpoints**: API routes `/products/public`, `/products/public/slug/{slug}`, and `/products/public/sku/{sku}` allowing headless configurations.
* **Action & Filter Hooks**: Extensive hooks like `omnify_settings_saved`, `omnify_before_checkout_validation`, `omnify_after_checkout_validation`, and `omnify_format_price` to customize store behavior.

== External Services ==

This plugin integrates with third-party payment gateways, analytics services, and external APIs to process transactions, handle webhooks, measure conversions, and manage customer avatars. These services are optional and only connect when configured by the site administrator or chosen by the customer at checkout.

* **PayPal Commerce & REST API**
  * What it is and what it is used for: Processes customer payments (Express Checkout, card payments, smart buttons, order capture, refunds) and verifies webhook/IPN notifications.
  * What data is sent and when: When a customer chooses PayPal during checkout or an admin issues a PayPal refund, order items, transaction amounts, currency, customer email, billing details, invoice references, and return/cancel URLs are sent to PayPal's REST API endpoints via `wp_remote_post()` and `wp_remote_request()`. Endpoints accessed include OAuth token authentication (`https://api-m.paypal.com/v1/oauth2/token` or sandbox), order creation and capture (`https://api-m.paypal.com/v2/checkout/orders`), refund processing (`https://api-m.paypal.com/v2/payments/captures/{id}/refund`), and webhook verification (`https://api-m.paypal.com/v1/notifications/verify-webhook-signature`).
  * Terms of Service: https://www.paypal.com/us/legalhub/useragreement-full
  * Privacy Policy: https://www.paypal.com/us/legalhub/privacy-full

* **Stripe**
  * What it is and what it is used for: Processes credit/debit cards, Apple Pay, Google Pay, Alipay, and Stripe Checkout sessions, as well as webhook event verifications and refunds.
  * What data is sent and when: When a customer enters payment information or selects Stripe at checkout, order totals, currency, customer name, email address, payment method tokens, and order line items are transmitted to Stripe's API (`api.stripe.com`).
  * Terms of Service: https://stripe.com/legal/consumer
  * Privacy Policy: https://stripe.com/privacy

* **Razorpay**
  * What it is and what it is used for: Processes payments via UPI, netbanking, cards, and wallets for India-based transactions, verifies payment signatures, and processes refunds.
  * What data is sent and when: When a customer selects Razorpay at checkout, order amounts, currency, receipt identifiers, customer name, email, and phone number are sent to Razorpay (`api.razorpay.com`).
  * Terms of Service: https://razorpay.com/terms/
  * Privacy Policy: https://razorpay.com/privacy/

* **Alipay**
  * What it is and what it is used for: Generates Alipay payment orders, verifies digital signatures, and processes customer transactions for Alipay users.
  * What data is sent and when: When a customer selects Alipay at checkout, order numbers, subject descriptions, currency, total amounts, and merchant parameters are sent to Alipay gateway endpoints (`openapi.alipay.com` or sandbox).
  * Terms of Service: https://render.alipay.com/p/f/agreementpages/alipayterms.html
  * Privacy Policy: https://render.alipay.com/p/f/agreementpages/alipayprivacy.html

* **WeChat Pay**
  * What it is and what it is used for: Creates WeChat Pay unified orders and QR codes, processes mobile payments, and handles payment notifications.
  * What data is sent and when: When a customer selects WeChat Pay at checkout, order IDs, total fees, product descriptions, customer IP address, and transaction metadata are sent to WeChat Pay API (`api.mch.weixin.qq.com`).
  * Terms of Service: https://www.wechat.com/en/service_terms.html
  * Privacy Policy: https://www.wechat.com/en/privacy_policy.html

* **SSLCommerz**
  * What it is and what it is used for: Processes cards, mobile banking, and internet banking for South Asian transactions, and validates IPN transaction sessions.
  * What data is sent and when: When a customer chooses SSLCommerz at checkout, customer name, email, phone, billing address, order ID, currency, and total amount are sent to SSLCommerz (`sslcommerz.com` or sandbox).
  * Terms of Service: https://sslcommerz.com/terms-and-conditions/
  * Privacy Policy: https://sslcommerz.com/privacy-policy/

* **Gravatar**
  * What it is and what it is used for: Displays customer and reviewer avatars in the admin dashboard and testimonials.
  * What data is sent and when: An MD5 hash of the customer's email address is sent to Gravatar (`secure.gravatar.com`) when displaying user avatars.
  * Terms of Service: https://automattic.com/tos/
  * Privacy Policy: https://automattic.com/privacy/

* **Google Analytics 4 / Google Tag Manager** (Optional conversion tracking)
  * What it is and what it is used for: Measures storefront traffic, page views, and eCommerce conversion events when the merchant enables GA4 tracking in Omnify settings and provides a Measurement ID.
  * What data is sent and when: When enabled by the admin, the visitor's browser loads Google Tag Manager scripts from `googletagmanager.com` and sends page views, purchase events, and browser/device metadata. No scripts are loaded if disabled.
  * Terms of Service: https://policies.google.com/terms
  * Privacy Policy: https://policies.google.com/privacy

* **Meta Pixel (Facebook)** (Optional conversion tracking)
  * What it is and what it is used for: Tracks page views and purchase conversion events for advertising and analytics when the merchant enables Meta Pixel tracking in Omnify settings and provides a Pixel ID.
  * What data is sent and when: When enabled by the admin, the visitor's browser loads Meta Pixel scripts from `connect.facebook.net` and sends page view and conversion signals to `facebook.com/tr`. No scripts are loaded if disabled.
  * Terms of Service: https://www.facebook.com/legal/terms
  * Privacy Policy: https://www.facebook.com/privacy/policy/

== Installation ==

1. Upload the plugin folder `omnify` to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Configure settings under the **Omnify** admin panel in your dashboard.

== Changelog ==

= 1.0.0 =
* Initial release.