Sensei: Some hooks are no more used by the new shortcodes

Created on 23 Mar 2016  路  5Comments  路  Source: Automattic/sensei

The new shortcode [sensei_user_courses] handled by class-sensei-shortcode-user-courses.php do not call anymore actions like :

  • sensei_after_completed_user_courses
  • sensei_before_completed_user_courses
  • sensei_after_user_courses
  • etc.

The former shortcode [usercourses] does. Should be great to call them again.

[Pri] Normal [Type] Bug

Most helpful comment

Hi @dwainm, thanks for your answer. In my opinion, those actions are really useful and should not be added back only for legacy / BC purpose. As you labeled it "type: bug" I think you probably agree.

For example, before the restructuring, I used sensei_after_completed_user_courses to remind the student to rate the course. This is no more possible with the new shortcode and this is hard for my client to understand why a newer version offers less functionality =)
Of course I can workaround to make it work as I'd like but... well you see, it would be smart to use actions and filters for such things.

All 5 comments

No one interested? It's important to be able to add actions before or after user_courses. It's a kind of hard functional regression to purely remove those hooks in the new version. What do you think?

Hi @cycomarcooo - It's not that we're not interested, it just sometimes takes a few days before we get chance to review issues.

@dwainm can you confirm whether those actions were removed intentionally, or should we add them back in?

@danjjohnson they were removed due to the restructuring and replaced in the newer shortcodes, but should probably be added back for legacy / BC purposes.

Hi @dwainm, thanks for your answer. In my opinion, those actions are really useful and should not be added back only for legacy / BC purpose. As you labeled it "type: bug" I think you probably agree.

For example, before the restructuring, I used sensei_after_completed_user_courses to remind the student to rate the course. This is no more possible with the new shortcode and this is hard for my client to understand why a newer version offers less functionality =)
Of course I can workaround to make it work as I'd like but... well you see, it would be smart to use actions and filters for such things.

@cycomarcooo I've added more hooks her but couldn't add the older hooks because the new interface is driven by Javascript. Please see here for the new hooks: 682f8f3cdf378f04222442854ce7f46236524eb6

Was this page helpful?
0 / 5 - 0 ratings