Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: WP user frontend pro integration #38887

    fredajt
    Participant

    I use the code below but it doesn’t works properly : it works on post creation but not when updating

    function gmw_update_location_via_wpuf(  $post_id ) {

    //make sure we have post ID
    if ( !$post_id )
    return;

    if ( defined( ‘DOING_AUTOSAVE’ ) && DOING_AUTOSAVE ) {
    return;
    }

    //change meta_field_name to the custom field of the address field
    $address = get_post_meta( $post_id, ‘adresse’, true );

    if ( empty( $address ) )
    return;

    //include geocoder file
    include_once( GMW_PT_PATH .’/includes/gmw-pt-update-location.php’ );

    if ( function_exists( ‘gmw_pt_update_location’ ) ) {

    //setup geocoder args
    $args = array(
    ‘post_id’         => $post_id,
    ‘post_title’      => get_the_title( $post_id ),
    ‘address’         => $address
    );
    //run geocoder function
    gmw_pt_update_location( $args );
    }
    }
    //update data of new post
    add_action(‘wpuf_add_post_after_insert’, ‘gmw_update_location_via_wpuf’, 10, 1 );
    //update data when post updated
    add_action( ‘wpuf_edit_post_after_update’, ‘gmw_update_location_via_wpuf’, 10, 1 );

    in reply to: WP user frontend pro integration #38880

    fredajt
    Participant

    Hi my problem is resolved by installing the beta version of gmw.


    fredajt
    Participant

    Hi, the function for wpuf pro doesn’t works anymore, the hooks have changed and i think something else but i don’t know what

    in reply to: WP user frontend pro integration #38450

    fredajt
    Participant

    Hi, thank you for answer, it is the 2.2.7 paid version of wpuf and gmw 2.6.0.2

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