Title: About Limits
Last modified: February 21, 2023

---

# About Limits

 *  Resolved [john201502](https://wordpress.org/support/users/john201502/)
 * (@john201502)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/about-limits/)
 * I bought the pro, but I have some questions to ask the author but I haven’t received
   a response after 5 days.
 * I set to give every user 1000 tokens per day. but I found their token numbers
   had not reset or accumulated after a day.
 * I want to set up a member class that can be given different tokens, but I don’t
   know how to write and input the code.
 * I think it will be better if the author can develop the function with a setting
   window but not throw some code to the user. not most of the users can understand
   the code.
 * I wish you can see my message and give me some surpports.
 * Thanks.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fabout-limits%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/about-limits/#post-16493381)
 * Hi [@john201502](https://wordpress.org/support/users/john201502/),
 * I am having a hard time replying to everyone in less than 24h, but I reply to
   everyone yesterday except 2-3 persons but they are not named John. Can you you
   reply to the support request to make sure I see it? (also make sure you used 
   the contact form; if you send me a message somewhere else I might not have seen
   it).
 * _I set to give every user 1000 tokens per day. but I found their token numbers
   had not reset or accumulated after a day._
 * You do this through the “Limits”? That should work, I am also using this. How
   did you set it up?
 * _I want to set up a member class that can be given different tokens, but I don’t
   know how to write and input the code._
 * Many of my users do that through roles, as it’s the easiest way to handle this.
   Then, they use the code I posted here: [https://meowapps.com/ai-engine/faq/#limits](https://meowapps.com/ai-engine/faq/#limits).
 * For clarity, I repost it here:
 *     ```wp-block-code
       add_filter( 'mwai_stats_credits', function ( $credits, $userId ) {
         $user = get_userdata( $userId );
         if ( !empty( $user->roles) && is_array( $user->roles ) ) {
           foreach ( $user->roles as $role) {
             if ( $role === 'premium' ) {
               return 50;
             }
             if ( $role === 'standard' ) {
               return 10;
             }
           }
         }
         // This will be basically the default value set in the plugin settings
         // for logged-in users.
         return $credits;
       }, 10, 2);
       ```
   
 * _I think it will be better if the author can develop the function with a setting
   window but not throw some code to the user. not most of the users can understand
   the code._
 * You mean the code above? Unfortunately, it’s extremely difficult to develop a
   nice UI to handle all the use cases possible; it would be a gigantic and complex
   UI, that wouldn’t be able to cover all the cases. So I have the choice: spend
   many months or making an UI that will be imperfect, or make it so that the plugin
   gives you the ability to do really everything you want very easily through code.
   Of course, being able to write code is important here, but I am happy to share
   examples, and most of them can be copy/pasted and adapted very easily. Otherwise,
   you could ask a dev to adapt it for you, and it would take 30mn or so.
 * If this code is unclear to you, feel free to ask about it here 🙂
 * To add it into your WordPress, I suggest using Code Snippets ([https://meowapps.com/add-custom-php-code-wordpress/](https://meowapps.com/add-custom-php-code-wordpress/)).
   You can keep your code snippets organized with a little description, so you will
   always know what it does.
 *  Thread Starter [john201502](https://wordpress.org/support/users/john201502/)
 * (@john201502)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/about-limits/#post-16493703)
 * Hi Jordy,
 * Thank you for your reply.
 * Which membership plugin do you recommand?I don’t know how to get the role’s name
   like “premium” or “standard” when I use another plugin.
 * I don’t know what the 50 mean?is it 50 dollars?
 * If I want to switch to tokens, it means I will have to exchange to tokens by 
   myself?
 * Is it for a month?or a day?I couldn’t see any parameter to change to 5000 token
   per day.
 * Thanks again.
 *  Thread Starter [john201502](https://wordpress.org/support/users/john201502/)
 * (@john201502)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/about-limits/#post-16493712)
 * Another ploblem ,please:
 * I display the status to user:
 * User ID: 1
   Queries: 2Tokens (Units): 572 / 5000Dollars (Price): 0.01Usage: 11.44%
   Status: OK
 * I want to hide the line of “Dollars (Price): 0.01”,how can I do that,please.
 * Best regards.
 * John
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/about-limits/#post-16497531)
 * You can add display_price=”false” in the shortcode 🙂 That will turn off that
   line.
 *  Thread Starter [john201502](https://wordpress.org/support/users/john201502/)
 * (@john201502)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/about-limits/#post-16497605)
 * I update the plugin and put the shortcode:
 * [mwai_stats_current display=”debug”  display_price=”false”][mwai_stats_current
   display=”usage”  display_price=”false”]
 * Nothing happen,it still show me :
 * User ID: 50
   Queries: 4Tokens (Units): 1165 / 5000Dollars (Price): 0.02Usage: 
   23.3%Status: OK
 *  Plugin Author [Jordy Meow](https://wordpress.org/support/users/tigroumeow/)
 * (@tigroumeow)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/about-limits/#post-16497615)
 * I have added this feature for you; so it’s only available in the latest version**
   
   1.0.4
   . Are you using that one?
 *  Thread Starter [john201502](https://wordpress.org/support/users/john201502/)
 * (@john201502)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/about-limits/#post-16497669)
 * Thanks Jordy.
 * No, I updated the plugin which is 1.0.3 now.
 * So how can I update to 1.0.4?
 * Could you please list all the parameter which I can hide?
 * And I found the usage does not reset after a day,do I need to reset manually 
   every day?
 * Thank you so much.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘About Limits’ is closed to new replies.

 * ![](https://ps.w.org/ai-engine/assets/icon-256x256.png?rev=3431928)
 * [AI Engine - The Chatbot, AI Framework & MCP for WordPress](https://wordpress.org/plugins/ai-engine/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ai-engine/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ai-engine/)
 * [Active Topics](https://wordpress.org/support/plugin/ai-engine/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ai-engine/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ai-engine/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [john201502](https://wordpress.org/support/users/john201502/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/about-limits/#post-16497669)
 * Status: resolved