WordPress.org

Forums

myCRED
Fatal error on using bbPress hook (6 posts)

  1. ibridge_jp
    Member
    Posted 1 year ago #

    Hi.
    I using bbPress hook.

    Fatal error: Using $this when not in object context in /wp-content/plugins/mycred/plugins/mycred-hook-bbPress.php on line 50
    on http;//mysite.com/forums/users/username

    Please fix theme.
    Thank you.

    WP 3.81
    myCRED 1.4

    https://wordpress.org/plugins/mycred/

  2. Gabriel
    Member
    Plugin Author

    Posted 1 year ago #

    Hi.

    Thank you for reporting this. If you open that particular file mentioned and change line 50 from:

    $balance = $mycred->get_users_cred( $user_id, $this->mycred_type );

    to:

    $balance = $mycred->get_users_cred( $user_id, $mycred->mycred_type );

    What theme are you referring to?

  3. ibridge_jp
    Member
    Posted 1 year ago #

    Thank you for reply and support!

    That error has disappeared after installing the "BuddyPress".

    So, I can not reproduce the behavior. Sorry.

  4. Gabriel
    Member
    Plugin Author

    Posted 1 year ago #

    I was able to replicate the issue using bbPress and updated the current version to include the proper code. I will be including it in the next update as well to cover all bases.

    Not sure what you mean with "BuddyPress" though.

  5. ibridge_jp
    Member
    Posted 1 year ago #

    Thank you for quick reply.

    An error has happened when using only "bbPress".

    Maybe, this error does not occur when using at the same time the "bbPress" and "BuddyPress"...

  6. Gabriel
    Member
    Plugin Author

    Posted 1 year ago #

    Have a look at your bbPress hook settings.
    You can select if you want to show your users balance in replies. This bug is only visible if you select to show balances. If not the bug will now show up.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • myCRED
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.