Hi,
You could try the [alg_wc_mppu_current_product_limit]
shortcode. Example:
[alg_wc_mppu_current_product_limit msg_template="You can only buy maximum %limit% of %product_title% (you\'ve already bought %bought%). The remaining amount is %remaining%."]
Parameters allowed:
- user_id – The user id. By default, tries to get the current user id.
- product_id – The Product id. By default, tries to get the current product id.
- msg_template – The message template. Here you can use the placeholders.
- condition – The condition to display the message. Please check Frontend > Product limit message > Condition.
- output_template – The message wrapper. Default value:
<span class="alg-wc-mppu-current-product-limit">{msg_template}</span>
.
Regarding the product limit data, this plugin is kind of complex. If you’re using the option Limits > Per product, this value will be saved as _wpjup_wc_maximum_products_per_user_qty
on the postmeta
table. If you use the Formula section to handle the product limits, it will be saved on the options
table as alg_wc_mppu_formula
.
Other than that, we’re saving the purchase info from orders on the postmeta
and termmeta
tables as _alg_wc_mppu_orders_data
and _alg_wc_mppu_totals_data
.