Support » Plugin: Customize WordPress Emails and Alerts - Better Notifications for WP » Duplicate e-mail sent when trigger is set to `CPT` Rending Review

  • Resolved otto.radics

    (@ottoradics)


    When I set the notification to trigger on Pending review status on a CPT, I receive duplicate notification e-mail. If the trigger is set to anything else, only one e-mail arrives (as expected).

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

    (@voltronik)

    Hi @ottoradics,
    Thanks for your message.

    How are the posts that are pending review being created? Is it via the WP Admin or via a front-end form?

    Thanks,
    Jack

    Thread Starter otto.radics

    (@ottoradics)

    Using acf_form, code is this:

    $args = array(
      'post_id' => 'new_post',
      'new_post' => array(
        'post_type'   => 'question',
        'post_status'   => 'pending'
      ),
      'post_title' => false,
      'post_content' => false,
      'fields' => array(
        'field_5a3154cf7e35e',
        'field_5a314e5bda704',
      ),
      'submit_value' => __('Submit question', 'sage'),
      'return' => '%post_url%',
    );
    
    acf_form($args);
    • This reply was modified 3 years, 4 months ago by otto.radics.
    Plugin Author bnfw

    (@voltronik)

    Hi @ottoradics,

    In that case, if you’re triggering from a front-end form, can you please take a look at this document and see if it helps?

    Thanks,
    Jack

    Thread Starter otto.radics

    (@ottoradics)

    Well, that just made things worst: now I get about 4 e-mail instead of 1. 🙂

    The problem only occurs if I create the post with pending status, private works fine.

    Plugin Author bnfw

    (@voltronik)

    Hi @ottoradics,

    Hmm. What happens if you choose another status for your form such as ‘publish’ instead? Do you still receive multiple notifications?

    Thanks,
    Jack

    Thread Starter otto.radics

    (@ottoradics)

    If I set another status, e.g. ‘private’, I receive the correct amount of notification e-mails.

    Ottó

    • This reply was modified 3 years, 4 months ago by otto.radics.
    Plugin Author bnfw

    (@voltronik)

    Thanks @ottoradics,
    I’s possible there’s an issue with regards to post status transitions when using the acf_form within BNFW.

    If this is the case, it should be fixed in the next version of BNFW but if I need more info, I’ll let you know.

    Thanks,
    Jack

    Thread Starter otto.radics

    (@ottoradics)

    Sure, let me know if you need more info!

    Thanks!
    Otto

    Plugin Author bnfw

    (@voltronik)

    Hi @ottoradics,
    After lots of investigation, unfortunately, due to the way ACF does a lot of custom handling whilst posing a form, it’s unlikely that BNFW will be able to find a fix for this. I’m investigating other methods of triggering a notification on a published post and then reverting the post post back to pending but I’m not sure if this is viable or possible yet.

    I’ll update this thread if there’s anymore news but for now, I’m afraid I’m not sure if there’s anything else I can do.

    Thanks,
    Jack

    Thread Starter otto.radics

    (@ottoradics)

    Thank you for your thorough efforts!

    Ottó

    Hello, have you found a solution to this problem? I also have this email duplication problem.

    Thread Starter otto.radics

    (@ottoradics)

    Yes: if you set post status to private it works as expected.

    • This reply was modified 3 years, 1 month ago by otto.radics.

    thanks @ottoradics for your solution, but i need to have ” pending ” for my workflow.
    I saw that topic https://wordpress.org/support/topic/duplicate-email-on-edit-post/ maybe is the same problem.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Duplicate e-mail sent when trigger is set to `CPT` Rending Review’ is closed to new replies.