Home Forums Plugin Support WP User Frontend Pro Increase the post count once a post is deleted

This topic is: not resolved

This topic contains 26 replies, has 4 voices, and was last updated by  Nayem 3 years, 6 months ago.

Viewing 15 posts - 1 through 15 (of 27 total)
  • Author
    Posts
  • #72510

    david
    Participant
    Post count: 40
    /**
     * Increase the post count once a post is deleted
     * 
     * @param int $post_id
     */
    function wpufe_trash_post( $post_id ) {
        // bail out if charging is not enabled
        if ( wpuf_get_option( 'charge_posting', 'wpuf_payment' ) != 'yes' ) {
            return false;
        }
         
        $author_id = get_post_field( 'post_author', $post_id );
        $userdata = get_userdata( $author_id );
     
        $count = ( $userdata->wpuf_sub_pcount ) ? $userdata->wpuf_sub_pcount : 0;
        if ( $count !== 'unlimited' ) {
            $count = intval( $count );
            update_user_meta( $userdata->ID, 'wpuf_sub_pcount', $count + 1 );
        }
    }
     
    add_action( 'wp_trash_post', 'wpufe_trash_post' );

    Thanks,
    David

    #72535

    Nayem
    Moderator
    Post count: 6480

    Hello David,

    Is this working now?

    #72651

    david
    Participant
    Post count: 40

    No, where is the solution? That’s code not work on last version.

    #72676

    Nayem
    Moderator
    Post count: 6480

    Hello David,

    We have added this feature in our plugin. In our next release this will be available. I will suggest you to keep patience for the next update.

    Thanks.

    #72802

    david
    Participant
    Post count: 40

    The previous code has been created for you. Because you can not update the code in a simple and so neither I nor my clients we wait for the next update of the plugin?

    #72824

    Nayem
    Moderator
    Post count: 6480

    Hello David,

    As we have added this new feature- (post count increase after deleting a post) so you have to wait for the next update. Right now we are in vacation. We will start our office from 29th Sept. Hope you got the e-mail from our company. Please keep patience.

    Thanks.

    #73631

    david
    Participant
    Post count: 40

    When will the next update? We need this code back to work again.
    Thanks.

    #73743

    Nayem
    Moderator
    Post count: 6480

    Hello David,

    We will release our next update within next week. This feature will be included in the latest version.

    #74160

    david
    Participant
    Post count: 40

    Hello,

    I read the changelog v2.3.10 (5 Ocotber, 2015) and not display this option: “Increase the post count once a post is deleted”. This has been finally included? Where can I find it?

    Thanks.
    David

    #74167

    Nayem
    Moderator
    Post count: 6480

    Hello David,

    I am really sorry to say that we have missed the feature to include.

    Please provide your login and FTP details by using this form: http://wedevs.com/provide-login-details/. I will add this in your site.

    Thank you 🙂

    #74179

    david
    Participant
    Post count: 40
    This reply has been marked as private.
    #74382

    david
    Participant
    Post count: 40

    Hello? Please someone can answer to the problem that we have? You did you solve it once and now you can do? We have our customers very angry!

    #74383

    Panikkos Andreou
    Member
    Post count: 16

    No support at all….Still waiting for response 3 days now.
    Ticketing system says “for faster communication and better user experience“.
    Sureeee….No response is 0 support

    #74420

    Nayem
    Moderator
    Post count: 6480

    Hello,

    We were in weekend and for this reason, I could not reply to your topic.

    It is not possible to provide the code here. If you can please provide your admin login details. I will install the develop version of the plugin.

    Thanks.

    #74437

    david
    Participant
    Post count: 40
    This reply has been marked as private.
Viewing 15 posts - 1 through 15 (of 27 total)

The topic ‘Increase the post count once a post is deleted’ is closed to new replies.