• Resolved mvcs

    (@mvcs)


    My client didn’t want Apple Pay showing up on her payment processing pages. When I deactivated it in the Stripe settings the Shop and Product pages break. The site is built with the Divi Builder and a child theme. In order to fix those pages, I had to reactivate Apple Pay. I tried some code I found to add to the functions.php file to remove it from the Checkout page but it broke the site:

    <?php
    /**
    * Remove Apple Pay button on the checkout page
    *
    * @return bool
    */
    function remove_stripe_apple_pay_button_on_checkout() {
    $apple_pay_instance = WC_Stripe_Apple_Pay::instance();
    remove_action( ‘woocommerce_checkout_before_customer_details’, array( $apple_pay_instance, ‘display_apple_pay_button’ ), 1 );
    remove_action( ‘woocommerce_checkout_before_customer_details’, array( $apple_pay_instance, ‘display_apple_pay_separator_html’ ), 2 );
    }
    add_action( ‘init’, ‘remove_stripe_apple_pay_button_on_checkout’, 1 );

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

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

    (@wpnomad)

    Hi @mvcs ,

    When I deactivated it in the Stripe settings the Shop and Product pages break.

    It is odd that Shop and Product pages are breaking when you deactivate Apple Pay. Just to make sure, you deactivated “Payment Request Buttons” from WP Admin → WooCommerce → Settings → Payments → Stripe. Is that right?

    Also, can you please switch the theme to a default theme like Storefront Theme and then check if the shop and product pages show as expected?

    If shop and product pages work as expected with the default theme, then I recommend reaching out to your theme support so they can check for conflicts with Apple Pay buttons.

    Plugin Support AW a11n

    (@slash1andy)

    Automattic Happiness Engineer

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

    Thread Starter mvcs

    (@mvcs)

    I decided to just leave it on since it improves conversions. Thank you both for getting back to me.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Disabling Apple Pay Breaks Shop & Product Pages’ is closed to new replies.