• Resolved anzgar

    (@anzgar)


    Hi,
    I need to add a small note (to my AGB) to the area where the apple pay / google pay button is displayed on the checkout page.
    I actually managed to add the note (at least close enough), but I would like it to show only when the apple/google pay button is there (right now it is always displayed).

    Can anybody here give me a hint on how to check wether apple/google pay is activated?
    I added the note using the functions.php of my child theme, so a “simple” if statement would be enough – but I don’t know what to check for ??

    Thanks in advance

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support AW a11n

    (@slash1andy)

    Automattic Happiness Engineer

    Hey there!

    When Apple Pay (and Google Pay) are loaded on the page, it’s in this div id: wc-stripe-payment-request-wrapper

    That div is hidden on pages that don’t qualify for Payment Requests (like Firefox, etc.) using JS.

    It’s shown on qualifying browsers, so loading a note in that div should be definitely doable.

    I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    Thread Starter anzgar

    (@anzgar)

    Hi,
    yes I already found out that showing and hiding is done by JS. Sadly I only know PHP and no JS ??
    I think one solution could be to just search and replace that div (replace it with itself plus the note), but I would hate to do that. Is there any chance for the developers to just add a hook inside the div? That would make everything else so much easier and more elegant…
    Thanks!

    Plugin Support Adam Heckler

    (@adamkheckler)

    Is there any chance for the developers to just add a hook inside the div? That would make everything else so much easier and more elegant

    It would be great to have you add your ideas to the Ideas Board, which is where developers go to look for future plugin features and improvements. ??

    I’ll go ahead and mark this as resolved. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘add small note (html) to apple pay area in checkout’ is closed to new replies.