Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hide/Show content if is my friend or no


  • javieregea
    Participant

    @javieregea

    Hi, I am trying to create a variable but can not. The idea is:

    ————————————————– ———-
    If my friend and is the category “Clothing”
    — This text is displayed —
    else
    — Other text appears —
    ————————————————– ———-

    What I have to do?
    thank you very much

Viewing 4 replies - 1 through 4 (of 4 total)

  • danbp
    Moderator

    @danbp

    Where should this happen ?


    javieregea
    Participant

    @javieregea

    Hi, this is to hide the button add to cart WooCommerce.
    Thank you.


    danbp
    Moderator

    @danbp

    a custom condition on the cart template ? Hum…. i don’t know that theme/plugin, but usually, an if statement is enough.

    Something like:
    if ( bp_is_user() && ! friends_check_friendship( bp_displayed_user_id(), bp_loggedin_user_id() ) )

    I would suggest you ask also on the Woocommerce support.


    javieregea
    Participant

    @javieregea

    Perfect!. Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hide/Show content if is my friend or no’ is closed to new replies.
Skip to toolbar