=== Quick Shop ===
Contributors: zackdesign, ElbertF, RavanH
Donate link: https://zackdesign.biz
Tags: cart, shop, paypal, e-commerce, checkout
Requires at least: 6.0
Tested up to: 6.9.1
Stable tag: 3.0.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Quick and easy shopping cart with PayPal and email checkout. No bloat, no custom post types — just define products as text and sell.

== Description ==

Quick Shop is a lightweight WordPress shopping cart. Define products as pipe-delimited text, drop a shortcode or block on any page, and you have an instant shop with a sidebar cart widget.

**No WooCommerce-level complexity.** Just products, a cart, and checkout.

**Features:**

* Define products as simple text: `Product Name | Price | Shipping | Property : Option1, Option2`
* Shortcode `[quickshop product="Product Name"]` for add-to-cart forms
* Gutenberg block — "Quick Shop Product" with product picker dropdown
* Sidebar cart widget showing items, quantities, and totals
* PayPal checkout
* Built-in email order form (sends order details to site admin via wp_mail)
* Configurable currency, decimal point, thousands separator, symbol position
* Free shipping threshold
* Terms and conditions link
* Restrict purchasing to logged-in users
* Translation ready

**Sample product list:**

`Cap | 25.00`
`Bag | 120.00 | | Color : Red, Blue`
`Shirt | 9.95 | 4.00 | Size : S, M, L`

**Upgrading from v2.x:**

* PHP sessions have been replaced with cookie-based cart storage — works with page caching and load balancers
* The TinyMCE editor button has been removed (use the Gutenberg block or type the shortcode directly)
* Email checkout no longer requires CForms2 — uses a built-in form with wp_mail()
* Inline styles replaced with a CSS file — update any custom CSS

== Installation ==

1. Upload the `quick-shop` folder to `/wp-content/plugins/`
2. Activate through the Plugins menu
3. Add products in Quick Shop > Products (one per line)
4. Configure settings in Quick Shop > Settings
5. Create a checkout page and select it in settings
6. Add `[quickshop product="Product Name"]` to any post/page, or use the "Quick Shop Product" block

== Frequently Asked Questions ==

= How do I change the currency? =

Go to Quick Shop > Settings and set the currency code (e.g. USD, AUD), symbol (e.g. $), and whether the symbol appears before or after the number.

= How do I add product options like size or color? =

In the product list, add properties after the shipping price: `Shirt | 9.95 | 4.00 | Size : S, M, L`

= The TinyMCE button is gone =

The old TinyMCE 3 button was removed in v3.0.0 as it stopped working in WordPress 3.9 (2014). Use the Gutenberg block or type the shortcode directly.

= I used CForms2 for email checkout =

CForms2 is no longer maintained. Quick Shop v3.0.0 includes a built-in email order form that sends directly via wp_mail() — no external plugin needed.

== Changelog ==

= 3.0.0 =

* New: Gutenberg block — "Quick Shop Product" with product picker dropdown
* New: Built-in email order form replacing CForms2 dependency (wp_mail)
* New: CSS file with clean class names (`qs-*` classes)
* New: Cart uses cookie + WP transients instead of PHP sessions
* Removed: TinyMCE 3 editor button (non-functional since WP 3.9)
* Removed: CForms2 integration (plugin is closed/unmaintained)
* Removed: Commented-out Authorize.Net code
* Removed: WordPress 2.6 compatibility code
* Fixed: Thousands separator never saved (form field name mismatch)
* Fixed: `get_option() or __()` precedence bugs in admin and widget
* Fixed: Undefined `$symbolAfter`/`$symbolBefore` variables
* Fixed: Undefined `$_POST['item_number']` on add-to-cart
* Fixed: `$feeShippingValue` typo in admin template
* Fixed: `header()` replaced with `wp_safe_redirect()`
* Fixed: Admin menu uses dedicated slugs instead of `__FILE__`
* Fixed: `admin_init` action no longer nested inside `admin_menu`
* Fixed: All `register_setting()` calls consolidated in `admin_init`
* Changed: Requires WordPress 6.0+

= 2.4.1 =

* Fixed PHP 8.1 deprecation: get_option() returning false passed to trim()/explode()

= 2.4.0 =

* PHP 8.x compatibility: replaced create_function() with anonymous function
* PHP 8.x compatibility: replaced PHP 4-style constructor with __construct()
* PHP 8.x compatibility: replaced mysql_query()/mysql_affected_rows() with $wpdb->update() in updater
* PHP 8.x compatibility: fixed bare constant in function_exists() call
* PHP 8.x compatibility: fixed undefined array key access in get_url()
* PHP 8.x compatibility: fixed list() crash on short product lines
* Replaced deprecated PLUGINDIR constant with plugin_dir_path()
* Replaced hardcoded plugin URLs with plugin_dir_url() and plugins_url()
* Replaced deprecated whitelist_options filter with allowed_options
* Replaced extract() with direct $args array access in widget
* Wrapped session_start() with status check
* Fixed function_exists() call with parentheses in function name string
* Tested with WP 6.9.1

= 2.3.1 =

* Update to change some links
* Minor bugfix for including widget.php (thanks jtkt)
* Editors may now use the backend for Quickshop

= 2.3 =

* Internationalisation support
* Misc bugfixes
* Removal of deprecated widget creation

= 2.2 =

* CForms2 email form integration

= 2.1 =

* WPMU 2.8+ compatibility
* Improved cart widget accessibility
* Options/Products page improvements

= 2.0 =

* Major rewrite
* Custom checkout page
* Inventory editor
* Starting/default shipping prices
* WordPress shortcode support
* Thousands separator formatting
* Toggle payment methods
* Updater for v1 to v2 tags
* Improved TinyMCE button
