mohamed789 (@mohamed789)

Forum Replies Created

Viewing 1 replies (of 1 total)
  • @mohamed789

    Participant

    hello guys i install bbpress style pack ,

    and i activate moderation

    add_action(‘transition_post_status’, ‘send_email_on_post_approval’, 10, 3);

    function send_email_on_post_approval($new_status, $old_status, $post) {
    if ($old_status === ‘pending’ && $new_status === ‘publish’) {

    if ($post->post_type === ‘reply’) {
    // Déclenche les notifications pour une réponse
    do_action(‘bbp_new_reply’, $post->ID, $post->post_parent, $post->post_parent, $post->post_author);

    } elseif ($post->post_type === ‘topic’) {
    // Déclenche les notifications pour un sujet
    do_action(‘bbp_new_topic’, $post->ID, $post->post_parent, $post->post_author);
    }
    }
    }

    why i dont receive the email from the post type topic ? (replies work normally )

    thanks

Viewing 1 replies (of 1 total)