Comments (6)
With this in mind, I think the plugin name and purpose can be expanded to the more generic to Use Stock Qty Only for Initial Product Purchase. That will facilitate both the one-to-one method (by setting Stock Qty to 1), the 4-to-1, and any other combination. It's certainly something I've seen requested previously (it's in a similar vein to this plugin, only it goes the extra step of handling when subscriptions are cancelled).
so this line would need to be removed
You might instead just want to change the cache to:
- use the
$product_id
as the key in the$cache
array - increment/decrement the value of that based on the activation/deactivation of subscriptions
from woocommerce-subscriptions-restrict-product.
Here is the related ticket: https://secure.helpscout.net/conversation/500664389/3874/
from woocommerce-subscriptions-restrict-product.
@thenbrent This plugin is actually designed to get around the inventory system completely. To use it effectively, the inventory should be turned off for subscription products. This is important because for the inventory system to prevent a product from being purchased, it also prevents it from being purchased when a failed order is manually paid for.
With this, we will be able to hide products from the front end without preventing them from being purchased when a 'pay now' link is clicked by customers.
Therefore, the name might be better something like Limit Subscriptions per Product.
from woocommerce-subscriptions-restrict-product.
Therefore, the name might be better something like Limit Subscriptions per Product.
The issue with that is the overlap and ambiguity between the use of the term Limit with the Limit feature in Subscriptions. But something like "Restrict product to one" or similar might be suitable.
from woocommerce-subscriptions-restrict-product.
Ah right of course, I forgot about that. In that case, I wonder if this Issue/feature is better served as part of: https://github.com/Prospress/woocommerce-subscriptions-do-not-reduce-stock-on-renewal ?
from woocommerce-subscriptions-restrict-product.
Checks for number specified in UI now. Added in 546c1ea
from woocommerce-subscriptions-restrict-product.
Related Issues (17)
- Single product page HOT 14
- subs cancelled in admin don't decrement product count in wcs_restriction_cache HOT 1
- No way to turn off product-level restriction if sitewide restriction is activated HOT 1
- Batch the cache query
- Add Cache display page HOT 1
- Doesn't allow manual renewals with recent version of WCS HOT 2
- Add visibility toggle HOT 1
- Refresh cache after sub is created in admin area HOT 2
- Actually i see is not working anymore
- Limit subscriptions but enable up/downgrades
- Add UI HOT 1
- Doesn't prevent purchase of more than the number specified HOT 1
- Testing and Review HOT 5
- Account for multiple quantities being purchased at once HOT 6
- Allow for customization/translation of warning messages HOT 2
- Not restricting at all. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from woocommerce-subscriptions-restrict-product.