I reply to all queries on the forums and via email, once per day, Monday to Friday (not weekends).

If you are new here, please see some information on how to ask for support. Thank you!

Hiding the error “User is not logged in!”

dashed-slug.net Forums General discussion Hiding the error “User is not logged in!”

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9340
    Anonymous
    Inactive

    Hi,

    Site http://www.timaxpay.com

    Problem for not logged in user : they see error :Error while rendering the rates shortcode with its default template in /home/customer/www/timaxpay.com/public_html/wp-content/plugins/wallets/templates/rates.php: User is not logged in!
    mo
    I can’t redirect all your pages to login / registry page ?

    Best regards,
    Valerii

    #9342
    alexg
    Keymaster

    That is correct. You cannot redirect the user directly to the template file. This is true for all WordPress plugins, not just this one.

    The template file is not a complete page, just an HTML fragment that gets inserted wherever you use the exchange rates file.

    To display exchange rates, create a WordPress page and insert the [wallets_rates] shortcode in it.

    with regards

    #9346
    Anonymous
    Inactive

    Hi,

    But WordPress has different plugins for restriction for logged in and not logged in user.
    If you look up in menu FIAT wallet page restricted only for logged in user in other case page redirected to login / registry page. bur users doesn’t see error on page.

    What i have to do to to prevent user from error if they not logged in ???

    Best regards,
    Valerii

    #9348
    alexg
    Keymaster

    Hello,

    Unfortunately the [wallets_rates] shortcode currently uses the JSON-API, which is available only to logged in users. Therefore it’s not possible at this time to display this shortcode to non-logged in users. This is something that will be solved in wallets 6.0.0, with some architectural changes.

    In the meantime, if you simply want to hide the error from users who are not logged in, there are two ways to do this:

    UI elements that display an error gain the error class. Therefore you can add the following to your CSS rules to hide it:

    .dashed-slug-wallets.error { display: none; }

    Alternatively, you can use a WordPress filter to modify the text of the error. The filter is wallets_ui_text_shortcode_error. To see an example of how to use it, you can look at the documentation, under “Frontend” -> “Template Modifications” -> “Shortcode rendering error messages”.

    Hope this helps. Please let me know if I misunderstood your question.

    with regards

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.