Support

Account

Forum Replies Created

  • Figured it out. The publish-hook is to early for ACF, so none of the newly published fields are ready yet. I changed it up to this:

    add_action( 'save_post', 'save_jobb', 100, 3 );

    ..also cranking up the priority to 100, to make sure that all other save jobs are done first.

    Furthermore I added a check for post type early in the new function, since the new one takes on all posting in general:

    $post_type = get_post_type($post_id);
    if ( "jobb" != $post_type ) return;

    Lastly, to prevent emails from being sent every time I edit a post belonging to a customer, I also added a small, new ACF field named mailsendt – to just hold the value 0 or 1 depending on whether a mail already has been sent or not.

  • Are you using english or some other language on your site? If not english, updating to 5.5.1 might fix things for you, and have all the content turn up in admin again, as it contains a fix for translation bugs.

Viewing 2 posts - 1 through 2 (of 2 total)