-3

i want to generate that Url

https://MyWebSiteUrl/order-received/thank-you/?key=wc_order_l58l4LPNKIgXB&order_id=2762

i have tried that code

// Return thankyou redirect
    return array(
        'result' => 'success',
        'redirect' => get_site_url( $order ).'order-received/thank-you/'.$order->order_key&order_id=.$order->id.' 
    );

but it gives me syntax error

can any body help in that ?

  • The quotes and concatenation for the "redirect" value look incorrect. It seems like you may want: `get_site_url($order) . 'order-received/thank-you/' . $order->order_key . '&order_id=' . $order->id;` – showdev Oct 10 '19 at 18:28

1 Answers1

-1

there's an extra apostrophe (') at the end of line 4

cakecoke
  • 7
  • 1