Redirect WooCommerce terima kasih
add_action( 'woocommerce_thankyou', 'woocommerce_custom_thank_you_page');
function woocommerce_custom_thank_you_page( $order_id ){
$order = wc_get_order( $order_id );
$url = 'https://yoursite.com/custom-page-url';
if ( ! $order->has_status( 'failed' ) ) {
wp_safe_redirect( $url );
exit;
}
}
Victorious Vole