# Send "Continue Shopping" to the Shop Page

> Points the "Continue shopping" and "Return to shop" links to the main shop page instead of the last viewed product or the homepage.

- Type: PHP
- Runs: Run everywhere
- Category: [WooCommerce](https://wpide.com/library/category/woocommerce/)
- Requires: WooCommerce
- Tags: woocommerce, cart, shop, links
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/woo-continue-shopping-to-shop/

## Code

```php
$wpide_shop_url = function () {
    return wc_get_page_permalink( 'shop' );
};

add_filter( 'woocommerce_continue_shopping_redirect', $wpide_shop_url );
add_filter( 'woocommerce_return_to_shop_redirect', $wpide_shop_url );
```

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Send "Continue Shopping" to the Shop Page" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
