This code redirects the user to the cart page upon completion of an action. The function wc_get_page_id() retrieves the page id of the cart page, and if it exists, the user is redirected to the cart page using the get_permalink() function.
Was this code snippet helpful?
YesNo