• Resolved reynskie

    (@reynskie)


    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)
  • Plugin Author Condless

    (@condless)

    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

    (@reynskie)

    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

    (@condless)

    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

    (@reynskie)

    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

    set the bronze limitation to 2 post only 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

    (@condless)

    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

    (@reynskie)

    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/uxwyjw – updated the cycle field

    Plugin Author Condless

    (@condless)

    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

    (@reynskie)

    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

    Thread Starter reynskie

    (@reynskie)

    btw i tried to removed the code then create a post again
    it updated the column counts.
    https://prnt.sc/uxxi2c

    Plugin Author Condless

    (@condless)

    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

    (@reynskie)

    hi condless

    i tried to removed the code then create a post again
    it updated the column counts.
    https://prnt.sc/uxxi2c

    Plugin Author Condless

    (@condless)

    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

    (@reynskie)

    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

    (@condless)

    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

    (@reynskie)

    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)
  • The topic ‘reset limit’ is closed to new replies.