AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

[Solved] Hook for Post Status Change (Approval) in wpForo

3 Posts
2 Users
1 Reactions
1,120 Views
st7878
Posts: 115
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@aima-forum)
Estimable Member
Joined: 6 years ago
[#62507]

Hello wpForo Support Team,

I’m developing a plugin that integrates wpForo with Telegram to send notifications when a post is approved (i.e., when its status changes from "Not Approved" (status = 1) to "Approved" (status = 0)). I’m currently using the wpforo_after_add_post hook to detect new posts, but this hook does not fire when a post’s status is updated (e.g., during moderation approval).

Could you please tell me which hook or event is triggered when a post’s status changes, specifically when a post is approved by a moderator? I’ve tried wpforo_after_update_post and wpforo_after_approve_post, but they don’t seem to work in my setup (wpForo version [2.1.6]).

Thank you for your help!

Best regards, Stanislav


Topic Tags
2 Replies
Robert
Posts: 10746
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@robert)
Support Team
Joined: 3 months ago

Hi @aima-forum ,

You can use the wpforo_post_status_update action hook, it has two parameters:

do_action( 'wpforo_post_status_update', $post, $status );

Please note that if $status === 1 the post is unapproved, if it's $status === 0 the post is approved.


1 Reply
st7878
(@aima-forum)
Joined: 6 years ago

Estimable Member
Posts: 115
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@robert Thank you. You helped me a lot. This is what I needed.


Share: