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

    (@voltronik)

    Hi @bigshow,
    Thanks for your message.

    I hven’t had any other reports of this – can you confirm you’re using WordPress 5.2?
    Can you also tell me if you’re using an SMTP plugin or not?

    Thread Starter Igor Ilgiyaev

    (@bigshow)

    Yes I use WP5.2
    and Post SMTP

    When a user creates a a post from acf front end its not sending( non admin )

    Plugin Author bnfw

    (@voltronik)

    Thread Starter Igor Ilgiyaev

    (@bigshow)

    and how did it worked without it?

    Plugin Author bnfw

    (@voltronik)

    Hi @bigshow,
    Couldn’t say to be sure – it’s possible a recent update to ACF has caused a problem but it’s difficult to say exactly.

    Please see how you get on with the above and let me know.

    Thread Starter Igor Ilgiyaev

    (@bigshow)

    I’ll try to use the link you provided on the acf even i didnt used it before.

    Thread Starter Igor Ilgiyaev

    (@bigshow)

    Sorry, But its not working.
    It’s not sending emails

    • This reply was modified 5 years, 6 months ago by Igor Ilgiyaev.
    Plugin Author bnfw

    (@voltronik)

    Hi @bigshow,
    Thanks – your reply wasn’t clear: have you used the code linked to above to see if it triggers notifications? I’ve used this on a few sites now and it’s worked great.

    Do emails show in the Email Log from Post SMTP?

    Thread Starter Igor Ilgiyaev

    (@bigshow)

    I do have the SMTP plugin and the Emails Log is not showing that an email was sent.

    Thread Starter Igor Ilgiyaev

    (@bigshow)

    This is the code that I use to send emails
    and it works great on 1.7.2
    If you need access I will send you through the Priority Support

    acf_form(array(
    ‘post_id’ => ‘new_post’,
    ‘post_title’ => false,
    ‘post_content’ => false,
    ‘new_post’ => array(
    ‘post_type’ => ‘vacation_place’,
    ‘post_status’ => ‘publish’
    ),
    ‘return’ => ‘https://www.gig-jockey.com/travel-sent’,
    ‘submit_value’ => ‘Send’
    ));

    $current_user_id = get_current_user_id();
    $current_user_country = get_user_meta( $current_user_id, ‘user_country’, true);
    ?>
    <span style=”display:none;” data-current-user-country=”<?php echo $current_user_country; ?>”></span>
    <script>
    jQuery(function( $ ) {
    var current_user_country = $(“span[data-current-user-country]”).data(‘current-user-country’);
    var country_field = $(‘#acf-field_5929c1718c65c’);

    $(‘#acf-form’).on(‘submit’, function() {

    $(‘.country-err-msg’).remove();

    if(country_field.val() === current_user_country) {
    country_field.after(‘<div class=”acf-error-message country-err-msg”><p>You can not choose your own country</p></div>’);
    return false;
    }
    });
    });
    </script>

    Plugin Author bnfw

    (@voltronik)

    Hi @bigshow,
    Thanks but did you use the updated code provided in my previous reply? To clairfy, you have to transition a post from another post status to publish before it will trigger the notification. Recent changes to both BNFW and ACF require this so you will most likely need to update your code to make it compatible.

    Thread Starter Igor Ilgiyaev

    (@bigshow)

    yes I did tried it and the post is published but not sent

    Thread Starter Igor Ilgiyaev

    (@bigshow)

    I think I know the problem
    $bnfw = BNFW::factory();
    remove_action( ‘pending_submissions’, array( $bnfw, ‘on_post_pending’ ), 10, 2);

    This code is cancels the action of sending and it changes it to pending.
    What I need is that after a user submits it will send automatically.

    From the last code I FALSE the title and content and use only acf fields and inside the function page I created a code that adds the acf field called “title” to the post title after submit.

    • This reply was modified 5 years, 6 months ago by Igor Ilgiyaev.
    Plugin Author bnfw

    (@voltronik)

    Hi @bigshow,
    It should send automatically providing that you save the post as pending and then transition the post status from pending to publish using the acf/save_post action. You have to transition the post betweetn two statuses for BNFW to recognise that a post has been added to the site. This is what WordPress does and is why BNFW works in the WP Admin, so you have to essentially replicate this when using another way of publishing, such as using an ACF form. Hope that makes sense.

    Is this what you’re doing?

    Thread Starter Igor Ilgiyaev

    (@bigshow)

    It make sense.
    So how it is working in 1.7.2 like I showed you earlier?
    I immediately publish the post and it sent out as supposed to be.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Plugin Stopped sending emails after update’ is closed to new replies.