=== Spending Limits for WooCommerce ===
Contributors: wpgenie2, freemius
Donate link: https://wpgenie.org/
Tags: woocommerce, spending limit, responsible gambling, budget, customer protection
Requires at least: 5.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.1.7
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Spending Limits for WooCommerce is an extension for Woocommerce which enables you to limit spending for customer.

== Description ==

**Spending Limits for WooCommerce** enables customers to set personal spending limits and purchase restrictions on their accounts, promoting responsible practices.

This plugin allows customers to configure spending limits for specific time periods (daily, weekly, monthly, or yearly) directly from their account dashboard. Once a limit is set, customers can only reduce it — increases or removals require administrator intervention. Additionally, site admin can set global spending limit and customers can voluntarily lock their accounts from making purchases for predefined periods, with only administrators able to lift these restrictions early.

= Features =

* Customer-controlled spending limits: Set maximum spending amounts per day, week, month, or year
* Self-imposed purchase locks: Temporarily lock account from purchases for 1, 4, 12 weeks, 1 year, or permanently
* One-way limit adjustments: Customers can reduce limits but cannot increase or remove them without admin approval
* Administrator controls: Edit or remove customer limits and purchase locks from wp-admin
* User management dashboard: View lists of users on break and their current spending limits
* Audit log: Searchable history of all limit and lock changes
* CSV export: Export user lists and audit logs for record-keeping

= Use Cases =

* Supporting responsible gambling and gaming commerce
* Age-restricted product stores with spending controls
* Subscription services with voluntary budget management
* Any WooCommerce store promoting responsible purchasing

= PRO Features =

All features of the free version, plus:

* Global spending limit for all site customers
* Custom limit periods: Configure limits by custom number of weeks or days beyond standard intervals
* Comprehensive reporting dashboard: Dedicated pages for users with active limits and locked accounts
* Advanced audit logging: Full audit log page with detailed history
* Date range filtering: Filter all reports by specific date ranges
* Enhanced CSV exports: Export capabilities across all report pages
* Premium support: Direct access to our ticket support system at https://wpgenie.org/support/

= Support =

You can contact us at our website [wpgenie.org](http://wpgenie.org/) if you have problems or questions.


== Installation ==

= Minimum Requirements =

* WordPress 5.0 or greater
* WooCommerce 5.0 or greater


= Setup =

This section describes how to install OnSale Page for WooCommerce plugin and get it working.

1. Upload the plugin files to the /wp-content/plugins/ directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Users will now have new entry in My Account called Spending Limits
5. User can set limits on lock out of checkout in My Account > Spending Limits
6. Administrators can see User Spending Limit and Lock Settings on User Profile page
7. Administrators can modify limits and lock period on Edit User Profile page
8. PRO version has option for custom limit period (weeks or days)
9. PRO version has reporting page where you can see locked out users and limits set and CSV export
10. PRO version has audit log page with CSV export


If you have any problems contact us at http://wpgenie.org/




== Frequently Asked Questions ==

= Can user change limit to higher one? =

No, user can only change limit to lower amount. Administrators can edit limit to higher amount. Users need to contact administrator in order to get help with this.

= Can user unlock account by himself? =

No, that is not possible, only Administrators can do that. Users need to contact administrator in order to get help with this.

= What is in PRO version? =

Option for global spending limit, custom limit period (weeks or days), reports pages where you can see list of users with their limits and locked out users. Along these reports there is audit log page. All pages have option to export data to CSV and date range filter. PRO version also comes with premium support.

= Have a question? =

If you want answer here please send us your questions to info@wpgenie.org



== Screenshots ==

1. Spending Limits for WooCommerce My Account entry where user can set limits and lock
2. Options for Administrators in Edit User Profile page in wp-admin
3. PRO feature - Page in wp-admin that shows users on break with export to CSV
4. PRO feature - Page in wp-admin that shows users with limit set and option for CSV export
5. PRO feature - Page in wp-admin with audit logs and option for CSV export
6. PRO feature - Global spending limits

== Changelog ==
= 1.1.7 =
Problem with Google Pay and Apple Pay checkout
Audit log date selection bug
Code cleanup
Warnings

= 1.1.6 =
Better notifications and texts
Users are able to set their own limit but it cannot exceed the global limit

= 1.1.5 =
Ability to set global spending limit for all site customers (daily, weekly, monthly or yearly)

= 1.1.4 =
Prevent users to constantly limit account with same amount

= 1.1.3 =
Audit log database bug

= 1.1.2 =
Limit now checks orders back for 24 hrs not whole day

= 1.1.1 =
Error Unsupported Operand Types: String - Null

= 1.1.0 =
New PRO Feature: Now users can see how much they have left to spend on my account and checkout page

= 1.0.10 =
Now you can load custom template from child theme

= 1.0.9 =
Bug with permanent self exclude feature

= 1.0.8 =
View Log problem fixed
CSV export fixed

= 1.0.7 =
Fatal error

= 1.0.6 =
Fatal error

= 1.0.5 =
Error on checkout
Error message for custom period
Typos

= 1.0.4 =
New PRO feture - Custom limit period (weeks or days)
Typos

= 1.0.3 =
Bug when checking out with free order
Typos

= 1.0.2 =
Range slider bug
Typo
Argument number specifier must be greater than zero

= 1.0.1 =
Freemius SDK update

= 1.0.0 =
Initial release