GEO my WP Support

Use this forum for technical support and general questions related to GEO my WP plugin and its core add-ons only. For technical support and general questions related to any of the premium extensions please open a new premium support ticket.

[Resolved]User Front end pro integration

Home Forums Support User Front end pro integration

This topic contains 17 replies, has 3 voices, and was last updated by  anticosti 5 months ago.

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #58234

    wpuser
    Participant

    Hello
    I need integration help with user front end pro.
    The only up to date(2018) guide i can find is here
    https://geomywp.com/forums/topic/badly-need-geo-my-wp-to-work-with-wp-user-frontend/

    This is the code i have in function.php of my child theme

    Since the above link is not an official guide i would like some clarification before i re-edit the code to fit my needs

    1. Do i need to add the new code to the function.php in my theme?
    or somewhere else?

    2. Do i need GEO my WP v3.2 beta for it to work or can i use the 3.1 stable version i currently have active.

    3. Do i need to wrap gmw_update_post_location( $post_id, $address ); and gmw_update_post_location_meta( $post_id, $metadata ); in separate functions{}? a syntax example if possible please.

    i have spent many hours and days trying to integrate UFpro with GMWp but with no success. i feel i have found the closest guide to making it work but i would appreciate some input from the community.

    i am using UFpro paid version.

    Thanks for your time

    #58235

    anticosti
    Participant

    @wpuser
    When you say UFpro … You mean “WP User Frontend Pro”:
    https://wordpress.org/support/plugin/wp-user-frontend/
    Isn’t it?

    #58239

    Eyal Fitoussi
    Keymaster

    @wpuser,

    1. Yes, the code should be placed in the functions.php file.

    2. You need GEO my WP v3.2 beta 2. That’s because of the required Google Maps server API key. In version 3.2 there is a new input box to enter the server key. There is also a testing tool to test your server API key. See this post to read about the server API key issue, how to generate it ( there is a link to the tutorial ), about the testing tool, and you can download the beta version from there.

    3. No, you can wrap both functions inside a single function as described in the link you provided.

    Let me know if this helps.

    #58259

    wpuser
    Participant

    Yes Anticosti i was referring to UserfrontEnd pro as UFpro.
    i made sure to use the full name in post description.

    i would like to extend a special thanks to you for getting on to the integration problem and finding a solution with Eyal.

    your post seems to be the only credible up to date guide.
    All the official guides seems out of date.

    well-done thanks

    #58260

    wpuser
    Participant

    Thanks for the clarification Eyal.
    I now have the confidence to tackle the integration issue.

    Switching to version 3.2 is a bit problematic for me
    because i have custom edits in 3.1 mainly for the display/css .

    i would need to safeguard all my edits so when i upgrade to version 3.2 things don’t break.

    Sure i will let you know if it solves the issues. I have a feeling it would work because i was doing it based on the old guides before.

    Thanks for you input Eyal
    REALLY really appreciate it

    #58261

    wpuser
    Participant

    Thanks Eyal. IT WORKS!! 🙂

    I had about 8 different versions of the code guides commented out on my function.php(Messy coder lol. This spans all the official guides and forum codes i came across while trouble shooting the issue).

    So looking through each code and checking references for the latest implementation on UFEpro site i was able to spot why the EDIT POST-UPDATE was not working in your code.

    this line
    add_action(‘wpuf_add_post_after_update’, ‘gmw_update_location_via_wpuf’, 10, 1 );

    needed to be changed to this
    add_action(‘wpuf_edit_post_after_update’, ‘gmw_update_location_via_wpuf’, 10, 1 );

    updated is now =(update)
    add_post_after_update is now =(edit_post_after_update)
    for UFEpro action hooks.

    for others experiencing integration issues
    if you dont enter 2 api keys or dont have the option to add 2 api keys EXPECT NOTHING TO WORK!! GEOmywp version 3.2 will give you the option to add 2 api key.
    1st for setting-google_maps_client_side_api_key
    2nd for setting-google_maps_server_side_api_key

    once you make the needed changes listed above you should have a SUCCESS FULL INTEGRATION!

    here is the final working code i used for the integration
    ////////////////////////////////////////////////////////////////
    /**** For GEO my WP version 3.2 beta ****/
    function gmw_update_location_via_wpuf( $post_id ) {

    // make sure post ID exists.
    if ( ! $post_id ) {
    return;
    }

    // verify updater function.
    if ( function_exists( ‘gmw_update_post_location’ ) ) {

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

    //run geocoder function
    gmw_update_post_location( $post_id, $address );

    // And to update your location metas would be:
    $metadata = array(
    ‘phone’ => get_post_meta( $post_id, ‘phone’, true ),
    ‘fax’ => get_post_meta( $post_id, ‘fax’, true ),
    ’email’ => get_post_meta( $post_id, ’email’, true ),
    ‘website’ => get_post_meta( $post_id, ‘website’, true ),
    );

    gmw_update_post_location_meta( $post_id, $metadata );
    }
    }
    //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 );

    //add_action(‘wpuf_add_post_after_update’, ‘gmw_update_location_via_wpuf’, 10, 1 );

    ////////////////////////////////////////////////////////////////

    Dont forget to change (addresss) meta_field_name to the custom field of the address field you are using.

    the last commented out code is not needed you can delete it

    (Post Meta Inspector)-this plugin lets you see the meta fields of the post on the post page in admin/backend.

    Hope it helps 🙂

    #58264

    wpuser
    Participant

    Here is the final working code i used for the integration

    #58265

    anticosti
    Participant

    @wpuser would really appreciate if you’d keep me updated on the integration. I’ll do the same if I have anything new. We’re two in this boat now 😉

    Cheers,

    #58267

    anticosti
    Participant

    @wpuser Oh! My bad. I guess I missed your above posts:
    #post-5826 and #post-58264

    Will try this now…

    • This reply was modified 1 year ago by  anticosti.
    #58269

    wpuser
    Participant

    🙂 You are welcome. you started it i just helped finished it lol.
    I marked the issue as solved now.
    Definitely will keep you posted
    thanks again

    #58270

    wpuser
    Participant

    ohh yeah i did
    hope it helps 🙂

    #58271

    anticosti
    Participant

    @wpuser Unbelievable!!!!
    You made it work, man 🙂
    You saved my project.
    I was almost ready to let this project drown, then… you came into my life. There is a lesson in this, somehow.

    Thank you Eyal for this great plugin and thank you @wpuser for dropping in with determination to find the solution.

    Now my users can update modify their address, phone, fax email, website address

    Gratitude, Gratitude, Respect.

    Sincerly

    #58273

    wpuser
    Participant

    it would be an understatement to say i can relate to your frustration.
    The truth is i feel that frustration
    NEVER GIVE UP MY FRIEND
    stay determined you will succeed

    Glad to help
    Enjoy 🙂

    #58275

    anticosti
    Participant
    This reply has been marked as private.
    #58397

    anticosti
    Participant

    Hi @Eyal, Hi @wpuser,
    Back to start. I upgraded my WordPress to 5.0 and then 5.0.1. All went fine and behaving perfect, and… just realized my users can’t post any NEW Geo My WP data from the Frontend with WP User Frontend Pro.
    Hmmm… I am really puzzled about this…
    Was just on the edge to launch (in a couple more days..)

    Seeking for your help again…

    If ever you need to contact me:
    (osfa)(dot)(zappa)(at)(gmail)(dot)(com)

    • This reply was modified 11 months, 4 weeks ago by  anticosti. Reason: email
Viewing 15 posts - 1 through 15 (of 18 total)

You must be logged in to reply to this topic.