Edit link visible only for these, who already paid

This topic contains 2 reply and 2 voices, and was last updated by webonsk 10 years, 11 months ago
Viewing 2 Posts - 1 through 2 (of 2 total)
Author Posts
May 2, 2013 at 2:46 pm 3098
webonsk Before receiving payment the post has "Awaiting approval" status as I chose in settings. But when this user, who didn't already pay for post, wants to edit the post, after editing the post is published. We wanted to have published post after editing because of users who already paid for posting, but this option also relates to these who didn't pay yet. So I would like to add code which displays "edit link" only if post is already paid. Can you help me with this? (We don't have a lot of users yet so it's not a big deal FOR NOW, but I already had to change the post status manually a few times because of it, later with much more users it could be big problem for us.)
May 2, 2013 at 3:26 pm 3099
Tareq Hasan Tareq Hasan

There is a line in /class/frontend-dashboard.php
if ( wpuf_get_option( 'enable_post_edit', 'wpuf_dashboard' ) == 'yes' ) {

You can change it to:

if ( wpuf_get_option( 'enable_post_edit', 'wpuf_dashboard' ) == 'yes' && $post->post_status == 'publish' ) {

That way only publish post’s will only show the edit post link.

May 2, 2013 at 3:38 pm 3104
webonsk webonsk

Thank you, it works!

Viewing 2 Posts - 1 through 2 (of 2 total)