Title: reset limit
Last modified: October 11, 2020

---

# reset limit

 *  Resolved [reynskie](https://wordpress.org/support/users/reynskie/)
 * (@reynskie)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/reset-limit/)
 * hi there is there a code to add it to the function.php to reset the limit of 
   the user if the user purchase a product? im using paid membership pro.
 * e.g
    if user 1 purchase product 1 then it limits a user to publish only 5 posts.
   when user used all the 5 posts then purchase back the product 1. can it be the
   limitation reset back to 5 again ?
 * thanks for the response

Viewing 15 replies - 1 through 15 (of 20 total)

1 [2](https://wordpress.org/support/topic/reset-limit/page/2/?output_format=md) 
[→](https://wordpress.org/support/topic/reset-limit/page/2/?output_format=md)

 *  Plugin Author [Condless](https://wordpress.org/support/users/condless/)
 * (@condless)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/reset-limit/#post-13523046)
 * Hi,
    In case you use WooCommerce to sell the products, you can use the code in
   the ‘How to reset the posts counts’ section in the plugin documentation (just
   update the $product_id).
 *  Thread Starter [reynskie](https://wordpress.org/support/users/reynskie/)
 * (@reynskie)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/reset-limit/#post-13523281)
 * hi condless.
 * thanks for the response,
 * i tried to used the code on the documentation & update the product id,
    yes the
   limitation is removed when user purchased the product again from woocommerce.
   however the limitation is not working anymore.
 *  Plugin Author [Condless](https://wordpress.org/support/users/condless/)
 * (@condless)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/reset-limit/#post-13524106)
 * Kindly update the plugin, than copy again the code from the documentation, update
   the product ID and the $rule_role with the role of the rule that the purchase
   of the product need to reset (for example ‘bronze’)
 *  Thread Starter [reynskie](https://wordpress.org/support/users/reynskie/)
 * (@reynskie)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/reset-limit/#post-13524223)
 * hi condless
 * thanks for the update.
    the issue is not fixed. i updated the plugin, i copied
   the code & update the product ID & $rule_role [https://prnt.sc/uxwak0](https://prnt.sc/uxwak0)
 * set the bronze limitation to 2 post only [https://prnt.sc/uxwaua](https://prnt.sc/uxwaua)
 * the limitation is working but when the user purchase the product in woo
    the 
   limitation is removed which is great but the user able to submit post unlimited.
   it should be the user have 2 new post limit again.
 * please advice thanks
 *  Plugin Author [Condless](https://wordpress.org/support/users/condless/)
 * (@condless)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/reset-limit/#post-13524264)
 * Please enable the Document Statistics option, than install the Multiple Roles
   plugin, take screenshot of the user row in the users table (Dashboard => users),
   
   go into Edit user, try to put the date of yesterday in the ‘Cycle’ field, take
   another screenshot of the users table
 *  Thread Starter [reynskie](https://wordpress.org/support/users/reynskie/)
 * (@reynskie)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/reset-limit/#post-13524349)
 * hi condless
 * thanks for the fast reply.
 * i installed multiple roles plugin,
 * here is the screenshot of the user
    [https://prnt.sc/uxwxz5](https://prnt.sc/uxwxz5)
 * [https://prnt.sc/uxwyjw](https://prnt.sc/uxwyjw) – updated the cycle field
 *  Plugin Author [Condless](https://wordpress.org/support/users/condless/)
 * (@condless)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/reset-limit/#post-13524415)
 * Now login as the woo3 user and try to create posts, and check if the Posts Limit
   column get updated and if the posts limit is working.
    Than remove the the code
   from the documentation and perform the same tests
 *  Thread Starter [reynskie](https://wordpress.org/support/users/reynskie/)
 * (@reynskie)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/reset-limit/#post-13524445)
 * hi condless
 * i try to post using woo3 account
    it only update the post counts and not the 
   post limit column [https://prnt.sc/uxxdqq](https://prnt.sc/uxxdqq)
 *  Thread Starter [reynskie](https://wordpress.org/support/users/reynskie/)
 * (@reynskie)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/reset-limit/#post-13524477)
 * btw i tried to removed the code then create a post again
    it updated the column
   counts. [https://prnt.sc/uxxi2c](https://prnt.sc/uxxi2c)
 *  Plugin Author [Condless](https://wordpress.org/support/users/condless/)
 * (@condless)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/reset-limit/#post-13524480)
 * See if the Posts Limits column is updated when you modify the cycle field into
   2020-10-11, and also if you totally remove the code from the documentation
 *  Thread Starter [reynskie](https://wordpress.org/support/users/reynskie/)
 * (@reynskie)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/reset-limit/#post-13524491)
 * hi condless
 * i tried to removed the code then create a post again
    it updated the column counts.
   [https://prnt.sc/uxxi2c](https://prnt.sc/uxxi2c)
 *  Plugin Author [Condless](https://wordpress.org/support/users/condless/)
 * (@condless)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/reset-limit/#post-13524572)
 * Hi, even without the code from the docs, it seems like the plugin is aware of
   only 2 posts instead of 5.
    Did you use the ‘cycle’ option when configured the
   rule? do you have custom post status in the website? can you take screenshots
   of this user posts details (just click on the number 5 from the users table)?
   you may send it also by Email
 *  Thread Starter [reynskie](https://wordpress.org/support/users/reynskie/)
 * (@reynskie)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/reset-limit/#post-13524606)
 * hi condless
 * yes i have custom post, however i am using the default post in WordPress for 
   testing.
 * the limitation is working properly but the reset function is not working when
   user purchased a product in woo, it removed the limitation instead of reset the
   limits.
 *  Plugin Author [Condless](https://wordpress.org/support/users/condless/)
 * (@condless)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/reset-limit/#post-13524655)
 * Hi,
    it seems like further debugging will be required which is out of scope for
   this support forum, please contact us by email
 *  Thread Starter [reynskie](https://wordpress.org/support/users/reynskie/)
 * (@reynskie)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/reset-limit/#post-13524677)
 * hi condless
    yes i think so
 * i also think because of the cycle date ?
    the limitation is working when i set
   the cycle date from yesterday,
 * then when i purchased the product again it set the cycle date today, and the 
   limitation is back to 0/2 count, but is not working, its not updating

Viewing 15 replies - 1 through 15 (of 20 total)

1 [2](https://wordpress.org/support/topic/reset-limit/page/2/?output_format=md) 
[→](https://wordpress.org/support/topic/reset-limit/page/2/?output_format=md)

The topic ‘reset limit’ is closed to new replies.

 * ![](https://ps.w.org/user-posts-limit/assets/icon-256x256.png?rev=2289666)
 * [User Posts Limit](https://wordpress.org/plugins/user-posts-limit/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/user-posts-limit/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/user-posts-limit/)
 * [Active Topics](https://wordpress.org/support/plugin/user-posts-limit/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/user-posts-limit/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/user-posts-limit/reviews/)

 * 20 replies
 * 2 participants
 * Last reply from: [Condless](https://wordpress.org/support/users/condless/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/reset-limit/page/2/#post-13537930)
 * Status: resolved