Close

REZERVACIJE

/* @ Redirect to thank you page after purchasing */ function custom_redirect_after_purchase() { global $wp; if (is_checkout() && !empty($wp->query_vars['order-received'])) { $order_id = absint($wp->query_vars['order-received']); $order_key = wc_clean($_GET['key']); $redirect = 'enter your thank you page url like "http://www.cluego.eu/en/checkout/order-received"'; $redirect = add_query_arg(array( 'order' => $order_id, 'key' => $order_key, ), $redirect); wp_safe_redirect($redirect); exit; } } add_action('template_redirect', 'custom_redirect_after_purchase');