=== PM Plus Minus AJAX Cart ===
Contributors: developerjillur, Zonayed Ahamad, sorobindu
Tags: WooCommerce, ajax, add-to-cart, plus-minus, quantity control, shortcode, dynamic, developer-friendly, replace cart, custom cart
Requires at least: 5.0
Tested up to: 6.7
Requires PHP: 7.2
Stable tag: 1.1.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

PM Plus Minus AJAX Cart enables AJAX-powered WooCommerce Plus(+) & Minus(-) Add to Cart buttons with quantity controls for both global settings and shortcode-based usage on product listings or single product pages.

== Description ==
**Plus Minus AJAX Add to Cart Button** is a WooCommerce add-on that provides an AJAX-powered add-to-cart button with plus-minus quantity controls. The plugin offers flexibility with Global cart replacement features and a Shortcode generator for more advanced use cases.

**Features Include:**
* **AJAX-based cart updates**: No page reload required when adjusting product quantities.
* **Dynamic replacement**: Replace default WooCommerce add-to-cart buttons with custom buttons globally or on selected pages.
* **Easy shortcode implementation**: Use `[pmatc_ajax_cart_button]` to add custom buttons to any product page or archive.
* **Flexible quantity display**: Choose between an input field or simple text display for product quantities.
* **Customizable design**: Customize the color, size, and icons for the add and remove buttons through the settings.
* **CSS Updater:** Provides customizable CSS fields for personalizing button styles.
* **Supports multiple product types**: Compatible with simple, variable, external, and grouped products.
* **Settings Page:** Accessible under WooCommerce > Settings > PM Ajax Cart.

**Here is the full shortcode:**
`[pmatc_ajax_cart_button quantity_type="input" plus_button_text="+" minus_button_text="-" button_bg_color="#049f56" button_text_color="#ffffff" variable_product_text="Select Variable" external_product_text="View Product" grouped_product_text="View Group"]`

== Screenshots ==
1. Plugin Output Demo Preview 
2. Plugin Setting Page Options Preview
3. Product Single Page Output Preview

== Installation ==
1. Upload the plugin files to the `/wp-content/plugins/woocommerce-plus-minus-ajax-add-to-cart` directory or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the ‘Plugins’ screen in WordPress.
3. Navigate to **WooCommerce > Settings > PM Ajax Cart** to configure your plugin settings.
4. Use the shortcode `[pmatc_ajax_cart_button]` to display the cart button on any page, or select **Replace Global** to use globally.

**Note:** This plugin does not support the block editor and themes using the block editor.

== Frequently Asked Questions ==

= Does this plugin support variable products? =
Yes, you can customize the button text for variable products from the settings page.

= Can I use the plugin with shortcodes only? =
Yes, the plugin provides a shortcode generator that can be used to insert custom buttons on any page.

= Does the plugin allow for custom CSS? =
Yes, there is a dedicated field for adding custom CSS that will be applied to your custom cart buttons.

= What are the options for replacing cart buttons? =
You can choose to replace cart buttons globally across single product, shop, category, and related products pages or use the shortcode for manual placement.

== Changelog ==

= 1.1.6 =
* Updated all JavaScript and CSS to use `wp_enqueue_script` and `wp_enqueue_style` for proper inclusion.
* Escaped all variables and options before output to prevent XSS vulnerabilities.
* Replaced the "pm" prefix with a more unique prefix across all functions, classes, and options to prevent conflicts.
* Added `if ( ! defined( 'ABSPATH' ) ) exit;` to all PHP files to block direct file access.
* Code improvements for security, compatibility, and compliance with WordPress guidelines.

= 1.1.5 =
* Updated "Tested up to" value for compatibility with WordPress 6.7.
* Addressed all issues identified in the manual review process.
* Enhanced shortcode functionality and global settings.

= 1.1.2 =
* Added activation hook to automatically set the default cart replacement mode to ‘Global’ on plugin activation, ensuring instant functionality.
* Optimized dynamic cart button replacement for related products.
* Improved shortcode generator to handle dynamic custom cart button placement.
* Enhanced user experience in the settings page with better field descriptions and improved UI for the shortcode generator.
* Various performance and security enhancements.

= 1.0.5 =
* Enhanced related product replacement support.
* Added shortcode generator to the settings page.
* Improved settings UX and CSS field for customization.
* Updated translation text domains.
* Code optimization and security enhancements.

= 1.0.4 =
* Initial release with global cart replacement and shortcode support.

== Upgrade Notice ==
* Version 1.1.6 includes important security fixes and updates for compatibility. It is strongly recommended to update to this version.