Git Product home page Git Product logo

Comments (6)

thenbrent avatar thenbrent commented on June 11, 2024 1

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:

  1. use the $product_id as the key in the $cache array
  2. increment/decrement the value of that based on the activation/deactivation of subscriptions

from woocommerce-subscriptions-restrict-product.

jrick1229 avatar jrick1229 commented on June 11, 2024 1

Here is the related ticket: https://secure.helpscout.net/conversation/500664389/3874/

from woocommerce-subscriptions-restrict-product.

NickGreen avatar NickGreen commented on June 11, 2024 1

@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.

thenbrent avatar thenbrent commented on June 11, 2024 1

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.

thenbrent avatar thenbrent commented on June 11, 2024

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.

NickGreen avatar NickGreen commented on June 11, 2024

Checks for number specified in UI now. Added in 546c1ea

from woocommerce-subscriptions-restrict-product.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.