Home Forums Plugin Support WP User Frontend Pro Edit link visible only for these, who already paid

This topic is: resolved

This topic contains 2 replies, has 2 voices, and was last updated by  webonsk 5 years, 9 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #3098

    webonsk
    Participant
    Post count: 18

    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.)

    #3099

    Tareq Hasan
    Keymaster
    Post count: 2831

    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.

    #3104

    webonsk
    Participant
    Post count: 18

    Thank you, it works!

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Edit link visible only for these, who already paid’ is closed to new replies.