🎉 Save up to 75% on Lifetime Plans – Limited Time Offer, Don't Miss Out!

Announcement! onclick Attribute of mycred_link is Deprecating Soon

Updated on January 8, 2026
onclick Attribute of mycred

If you use the mycred_link shortcode, this announcement is for you.

The onclick attribute is being phased out. It will be replaced with a WordPress-native JavaScript hook system. This new approach uses wp.hooks to handle click actions safely.

What’s Changing

  • onclick attribute is no longer supported in Shortcode.
  • Developers can attach their custom logic using mycred_link_click JavaScript action:

Migration Plan

Phase 1 – Already Released

  • The new hook system has been introduced.
  • onclick is still working temporarily to avoid breaking existing sites.
  • Documentation and guidance provided.

Phase 2 – Following Release (~1 month later)

  • Inline onclick will be removed entirely.
  • The hook system becomes the only supported method.

What You Need to Do

  • Update your site to use the hook system instead of onclick.
  • Move any existing click logic into wp.hooks.addAction.
  • Test all interactions to ensure behavior remains the same.

Developer’s Guide

Get a complete understanding of this announcement here: https://codex.mycred.me/shortcodes/mycred_link/ 

No other shortcode usage, content structure, or myCred point logic changes. The update is purely a shift from inline JavaScript to a safer, hook-based approach.

Final Word

The transition is planned and gradual. Phase one gives you time to adapt. Phase two completes the move. Take action early. Move your logic to the hook system now to ensure your site remains fully compatible with future releases.

Article by

Abdul Basit Sayeed

Abdul Basit is a content writer who turns WordPress websites into conversion machines. Apart from improving marketing funnels or finding content gaps, he explores new and emerging technologies. He helps people fix their marketing problems and writes simple tips that actually work.

11
Scroll to Top
myCred myCred
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.