Navigation überspringen

[Gelöst] Form can only be used 5 times (woocomerce)

This support ticket is created vor 6 Jahren. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von SteffenM1628 vor 6 Jahren.

Assistiert von: Waqar.

Author
Artikel
#1167677

Hey there wonder if thats possible.
A user buys a woocomerce product an can use 5 times the form an can make 5 Posts.

Or a user buys a woocomerce product and can make unlimited post lets say for one year.

Thanks

#1168421

Hi Steffen,

Thank you for contacting us and I'll be happy to assist.

> A user buys a woocomerce product an can use 5 times the form an can make 5 Posts.

- There is no direct option available to limit the number of posts for individual users, but there is a workaround that can be used.

You can first create a custom shortcode ( ref: https://toolset.com/documentation/adding-custom-code/how-to-create-a-custom-shortcode/ ) that gets the total number of posts from the currently logged-in user and returns the number.
( ref: https://codex.wordpress.org/Template_Tags/get_posts )

Based on that returned value, you can show/hide the form that adds new posts, from that particular user.
( ref: https://toolset.com/documentation/user-guides/conditional-html-output-in-views/ )

> Or a user buys a woocomerce product and can make unlimited post lets say for one year.

- For time-based recurring subscriptions, linked to WooCommerce products, it would be best to use a dedicated subscription/membership management plugin like "WooCommerce Subscriptions":

https://woocommerce.com/products/woocommerce-subscriptions/
versteckter Link

I hope this helps.

regards,
Waqar

#1169757

My issue is resolved now. Thank you!