Git Product home page Git Product logo

Comments (3)

Fitoussi avatar Fitoussi commented on September 28, 2024 1

The new format of the address is an array rather than string. This was changed because in some of the premium extensions it is possible to set the address field of the search form between a single address field ( which is the default with GEO my WP ) to multiple address field ( street, city, zipcode... ).

I am not sure if it can be easily change back to a string without breaking things. However, you can still easily retrieve the address value using $_GET['address'][0] instead of $_GET['address'].

from geo-my-wp.

TechRemarker avatar TechRemarker commented on September 28, 2024

Thanks for that info. While the change makes it a bit tougher since plugins like Gravity Forms aren't compatible with that array version, they did have a workaround of adding the following function incase anyone comes across the same question later on:

add_filter( 'gform_field_value_address', 'populate_address' );
function populate_address( $value ) {
return $_GET['address'][0];
}

from geo-my-wp.

Fitoussi avatar Fitoussi commented on September 28, 2024

Thank you for sharing the solution.

I will look into this again and see if it will be easily possible to use the address value as a string when using the single address field. And use it as an array only when using multiple address fields.

However, I believe that keeping it consistence, as an array, will make it easier by preventing GEO my WP and other plugins from checking if the value is an array or not.

I am curious to know, if you don't mind me asking, how exactly do you use GEO my WP and Gravity Forms together?

from geo-my-wp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.