Redirect after card delined
-
Hi Team,
I’m having issues with Stripe declined cards as the delivery fee gets $0 after a card is declined. The user can then pay again for $0 delivery with the correct card details.
I wish to redirect users to a different page when a card is declined.
I already tried the following code but the page doesn’t redirect. Just shows this error: https://ibb.co/cTzjvLm
function stripe_redirect_declined_card( $order_id ){ global $woocommerce; $order=new WC_Order($order_id); if ( $order->has_status( 'failed' ) ) { header('Location: https://domain.com.au/failed-payment/'); } } add_action( 'woocommerce_thankyou','stripe_redirect_declined_card',10,1);
Could someone please assist me in this regard?
Cheers
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Redirect after card delined’ is closed to new replies.