Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author gchokeen

    (@gchokeen)

    Please describe your issue to help you. What is the problem?

    Thread Starter Pete

    (@perthmetro)

    When a user clicks on the Subscribe button to subscribe to an author the subscriber doesn’t receive a notification email when the post author posts via the WP User Frontend Pro Frontend posting form. My guess is your plugin needs to catch the post using the WP User Frontend Pro hooks.

    Plugin Author gchokeen

    (@gchokeen)

    WP User Frontend Pro Frontend posting form Plugin seems not firing “new_to_publish” hook!

    Thread Starter Pete

    (@perthmetro)

    What can we do?

    Plugin Author gchokeen

    (@gchokeen)

    You basically need to find the action that plugin use while new post published. Use that hook as below in your theme function.php

    add_action(‘your_plugin_hook’, array(new Wp_Subscribe_Author(), ‘wpsa_notify_author_subscribers’));

    Plugin Author gchokeen

    (@gchokeen)

    Note: that plugin action hook should send the $post object as parameter to make wpsa_notify_author_subscribers function work

    Thread Starter Pete

    (@perthmetro)

    Will these hooks work?
    http://docs.wedevs.com/docs/wp-user-frontend-pro/developer-docs/

    I don’t know anything about this, I’d like to see it work 🙁

    Plugin Author gchokeen

    (@gchokeen)

    Maybe you need to use this http://docs.wedevs.com/docs/wp-user-frontend-pro/developer-docs/wpuf_edit_post_after_update/ hook.

    But this hook seems sending post_id instead post object. so ahead and edit our plugin to get the post object from post id.

    I may adjust plugin later update with number of hooks. so users can customize the code without changing it.

    Maybe you can extend the Wp_Subscribe_Author class to override wpsa_notify_author_subscribers function

    class my_Wp_Subscribe_Author extends Wp_Subscribe_Author{
    
     public wpsa_notify_author_subscribers($post_id){
       // Do your stuff
     }
    }
    
    add_action('your_plugin_hook', array(new my_Wp_Subscribe_Author(), 'wpsa_notify_author_subscribers'));

    Thread Starter Pete

    (@perthmetro)

    Where does that code go?

    Plugin Author gchokeen

    (@gchokeen)

    Try it on your active template function.php

    Thread Starter Pete

    (@perthmetro)

    what do you mean by // Do your stuff?

    Plugin Author gchokeen

    (@gchokeen)

    public wpsa_notify_author_subscribers($post_id){
     $post = get_post($post_id);
    
     // my plugin code goes here, copy the code from plugin and past it
    }

    play with my guide. hope it will solve your issue. now I am marking this ticket solved.

    Thread Starter Pete

    (@perthmetro)

    Thanks, but please don’t mark it as resolved as the question clearly hasn’t been resolved. I understand if you no longer want to offer any more help, but that doesn’t make it resolved. Someone reading the title will come here thinking that it is.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘How do I get to this work with WP User Frontend Pro?’ is closed to new replies.