# Store Shortcuts in the Admin Bar

> Adds a "Store" menu to the admin toolbar with quick links to orders, products, coupons, customers and settings, available on the front end too.

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

## Code

```php
add_action( 'admin_bar_menu', function ( $bar ) {
    if ( ! current_user_can( 'manage_woocommerce' ) || ! function_exists( 'wc_get_container' ) ) {
        return;
    }

    $hpos  = class_exists( '\Automattic\WooCommerce\Utilities\OrderUtil' ) && \Automattic\WooCommerce\Utilities\OrderUtil::custom_orders_table_usage_is_enabled();
    $links = array(
        'orders'    => array( 'Orders', $hpos ? admin_url( 'admin.php?page=wc-orders' ) : admin_url( 'edit.php?post_type=shop_order' ) ),
        'products'  => array( 'Products', admin_url( 'edit.php?post_type=product' ) ),
        'add'       => array( 'Add product', admin_url( 'post-new.php?post_type=product' ) ),
        'coupons'   => array( 'Coupons', admin_url( 'edit.php?post_type=shop_coupon' ) ),
        'customers' => array( 'Customers', admin_url( 'users.php?role=customer' ) ),
        'settings'  => array( 'Settings', admin_url( 'admin.php?page=wc-settings' ) ),
    );

    $bar->add_node( array( 'id' => 'wpide-store', 'title' => '<span class="ab-icon dashicons dashicons-cart" style="margin-top:2px"></span>Store', 'href' => $links['orders'][1] ) );

    foreach ( $links as $id => $link ) {
        $bar->add_node( array( 'parent' => 'wpide-store', 'id' => 'wpide-store-' . $id, 'title' => esc_html( $link[0] ), 'href' => esc_url( $link[1] ) ) );
    }
}, 80 );
```

## Notes

Only shown to users who can manage WooCommerce; edit the $links array to add your own shortcuts.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Store Shortcuts in the Admin Bar" 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/
