# Log In Reminder Above the Cart

> Reminds guests at the top of the WooCommerce cart that they can log in to use saved addresses and see their order history.

- Type: Universal
- Runs: Woocommerce before cart
- Category: [Login](https://wpide.com/library/category/login/)
- Requires: WooCommerce
- Tags: login, woocommerce, cart
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/woo-login-links-before-cart/

## Code

```php
<?php if ( ! is_user_logged_in() && function_exists( 'wc_get_page_permalink' ) ) : ?>
<div class="woocommerce-info wpide-cart-login">
    Already have an account?
    <a href="<?php echo esc_url( add_query_arg( 'redirect_to', rawurlencode( wc_get_cart_url() ), wc_get_page_permalink( 'myaccount' ) ) ); ?>">Log in</a>
    to check out faster with your saved details.
</div>
<?php endif; ?>
```

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Log In Reminder Above the Cart" in its snippet library and add it in one click; or create a new Universal snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
