Notifications
Clear all

Limited Support

Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.

 

wpForo 1.x.x [Closed] How to close a topic by API?

1 Posts
1 Users
0 Reactions
743 Views
Posts: 35
Topic starter
(@tahtu)
Member
Joined: 5 years ago

I would like to close a topic from PHP.

For this, I tried this:

 WPF()->topic->edit( [ 'topicid' => 1, 'closed' => 1] )

... but this does not close it.

I can't find a solution, but I think this should be called also:

wpforo_clean_cache( 'topic', 1 )

Do I have to call a SQL UPDATE statement directly, or do you have a function for me, doing this?