• Resolved fkoomek

    (@fkoomek)


    Hello.
    I am working on a little script.
    I added a tab called ‘Video’ and added a video there.
    By using woocommerce_before_add_to_cart_form hook I am echoing a button saying ‘Watch video’ under short description.
    Now I want to echo this button only when the Video tab will be present.
    Could help me with that? Which condition to use?
    Thanks

    Best Regards,
    Radan

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • @fkoomek,

    Off the top of my head I’m not sure but I’m going to open up my test environment and see if I can figure something out for you! Thanks for telling me the hook you’re using that makes it a lot easier!

    Cheers,
    – Freddie

    Thread Starter fkoomek

    (@fkoomek)

    Thank you.
    Well, I am using jQuery solution for now.

    @fkoomek,

    I’m glad you got it working! I was trying to reproduce but I don’t think there is any other way to do something like that without using Javascript like you’ve done. What was your solution if you don’t mind me asking?

    Cheers,
    Freddie

    Thread Starter fkoomek

    (@fkoomek)

    I am simply checking if the video tab element exist and if yes I’ll show the watch video button ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to check if a tab exists’ is closed to new replies.