Apple Pay, thank you page?
-
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
- The topic ‘Apple Pay, thank you page?’ is closed to new replies.