• Resolved techtivist

    (@techtivist)


    Hi!

    Seems like a great plugin and exactly what I need.

    However I can’t get it working.

    Here’s what I get with wordpress debug mode on:

    Trying to get property of non-object in /wp-content/plugins/geotargeting/includes/class-geotarget-functions.php on line 102

    So this line to be exact:
    if ( strtolower( $user_country->name ) == strtolower( $c )|| strtolower( $user_country->isoCode ) == strtolower( $c ) ) {

    Some help would be very much appreciated.

    To give some context:

    When I enter this:

    [geot exclude=”IN”] Will show to everyone except India users[/geot]
    [geot country=”IN”] Should be shown in India [/geot]
    [geot exclude=”US”] Will show to everyone except US users[/geot]
    [geot country=”US”] Should be shown in US [/geot]

    Will show to everyone except India users
    The page shows this:

    Will show to everyone except US users

    Thanks!

    https://www.ads-software.com/plugins/geotargeting/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP Error "Trying to get property of non-object in"’ is closed to new replies.