Use wpinv_get_ip in widget logic

This topic contains 6 replies, has 3 voices, and was last updated by  adyp 6 years, 7 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #1379

    adyp
    Buyer
    Post count: 496

    Hello,

    is it possible to use the wpinv_get_ip filter in widget logic to make a widget appear on a page when the user is browsing, for instance, from a UK IP address? If so, what code would you suggest using in widget logic setting?

    Thanks

    #1380

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    I honestly have barely used widget logic, maybe if you explain what you are trying yo do i can help more?

    Stiofan

    #1381

    adyp
    Buyer
    Post count: 496

    Hi Stiofan,

    I want to have a widget appear in a sidebar of a page using Widget Logic if the website user’s IP is in the UK (as determined by the snippet in the link above).

    Adrian

    #1382

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Thats not what that is used for, maybe widget logic have some standard features to be able to do this?

    Stiofan

    #1383

    adyp
    Buyer
    Post count: 496

    ok – the documentation wasn’t explicit about what it was used for. The fact that there was documentation for it (the link) suggested to me that it could be used for things other than the built-in Invoicing plugin functions – it that the case?

    #1384

    Alex Rollin
    Moderator
    Post count: 27815

    That particular function is used to inform WP Invoicing of which tax rules to apply based on country.

    All functions of our software are documented in the codex pages.

    Anything is possible with customization but this particular function is not currently integrated into other plugins at this time.

    #1385

    adyp
    Buyer
    Post count: 496

    Fair enough – it’s just that I happened across the wpinv_get_ip snippet/documentation and though it was being supported for other uses. In a directory plugin – especially one that has geolocation built in – it would be VERY useful to select widgets (and other content) based on country location (and even smaller areas). I guess there must be a good reason why GD is not in favour of this?

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket