• Resolved MDC2957

    (@mdc2957)


    With my old non-Stripe payment gateway, I’ve been using a code snippet that sends the customer to a custom thank you page when they order a particular item:

    add_action( 'woocommerce_thankyou', 'redirect_product_based_2hr', 1 ); 
    function redirect_product_based_2hr ( $order_id ){
                $order = wc_get_order( $order_id );
            
                foreach( $order->get_items() as $item ) {
                    // Add whatever product id you want below here
                    if ( $item['product_id'] == 6865 ) {
                        // change below to the URL that you want to send your customer to
                         wp_redirect( 'https://www.mysite.com/custom-ty-page/' );
                    
                    }
                }        
    }
    

    Yesterday I switched to Stripe, and enabled the other payment methods like Apple Pay. This morning I get an order from one of my regular customers for this item and he used Apple Pay via Stripe. After a few minutes, I got an email from him:

    So I used apple pay but it didn’t take me to the calendar…please send the link.

    As I’m not familiar with Apple Pay (I don’t own any Apple devices), I don’t understand why the customer wasn’t sent to the custom TY page after placing his order. Can anyone explain? Thank you

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter MDC2957

    (@mdc2957)

    Can anyone from WooCommerce comment on this? Need to get it fixed as soon as I can

    Plugin Support Mike Straw

    (@mikestraw)

    Apple Pay takes the customer not just off-site, but off their web browser in some cases.

    Do you know if this is happening for everyone using Apple Pay or if it’s just on mobile devices? It may be that the mobile app is causing issues with the way it’s returned.

    Thread Starter MDC2957

    (@mdc2957)

    It’s possible that the customer is using a mobile device as I know he uses his mobile device for everything. I can ask him..

    Thread Starter MDC2957

    (@mdc2957)

    He told me he was using an iPad. Incidentally, today he tried apple pay and the payment failed for some unknown reason according to stripe.

    Plugin Support Mike Straw

    (@mikestraw)

    Hi @mdc2957 ,

    That may be coming from an issue with his own Apple Pay account or card. If an order is generated, there should be details about the failure there.

    As far as the redirection code, his is a fairly complex development topic. 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.

    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.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Apple Pay, thank you page?’ is closed to new replies.