• Resolved dazwiafl

    (@dazwiafl)


    hej,

    first of all, thx 4 this awesome plugin. it ROCKS!
    i just have one question which i’m really struggeling with…
    my setup adds a hook on the publish of a custom post type

    add_action( 'publish_bfm_tbf', 'wp_cdn_mongo_provider_hook_page_update', 999 )

    in this hook i am gathering all the information, the user has stored in simple fields in the backend and propagate it to my cdn and/or mongo-db (depends on the type)

    the problem i’m having is that in the mongo-db the actual values are only arriving at every second publish cycle…
    i’ve already added a priority of 999 to the hook to make it run at the “last” position, but it isn’t working as well.

    maybe someone can help me out with this 😉

    greez
    anton

    https://wordpress.org/plugins/simple-fields/

Viewing 1 replies (of 1 total)
  • Thread Starter dazwiafl

    (@dazwiafl)

    i’ve found the solution now by myself.

    for anyone looking for this problem:

    add_action( 'publish_bfm_tbf', 'wp_cdn_mongo_provider_hook_page_update', 10, 2 );
    function wp_cdn_mongo_provider_hook_page_update($post_id) {
    //...some code...
      add_action( 'updated_postmeta', 'wp_cdn_mongo_provider_hook_page_update_after_meta_save', 10, 2 );
    }
    
    function wp_cdn_mongo_provider_hook_page_update_after_meta_save($meta_xy, $post_id){
    //...some code...
Viewing 1 replies (of 1 total)
  • The topic ‘hook @ publish_post’ is closed to new replies.