Title: Show Orders Shortcode for WooCommerce
Author: con
Published: <strong>19 maijs, 2022</strong>
Last modified: 16 jūlijs, 2026

---

Meklēt spraudņus

![](https://ps.w.org/wc-show-orders-shortcode/assets/banner-772x250.png?rev=3610398)

![](https://ps.w.org/wc-show-orders-shortcode/assets/icon-256x256.png?rev=3610398)

# Show Orders Shortcode for WooCommerce

 Autors [con](https://profiles.wordpress.org/conschneider/)

[Lejupielādēt](https://downloads.wordpress.org/plugin/wc-show-orders-shortcode.1.2.0.zip)

 * [Sīkāka informācija](https://lv.wordpress.org/plugins/wc-show-orders-shortcode/#description)
 * [Atsauksmes](https://lv.wordpress.org/plugins/wc-show-orders-shortcode/#reviews)
 *  [Uzstādīšana](https://lv.wordpress.org/plugins/wc-show-orders-shortcode/#installation)
 * [Attīstība](https://lv.wordpress.org/plugins/wc-show-orders-shortcode/#developers)

 [Atbalsts](https://wordpress.org/support/plugin/wc-show-orders-shortcode/)

## Apraksts

Drop `[show_wc_orders]` into any page, post or widget area that renders shortcodes,
and the logged-in customer sees their own orders: order number, date, status, total
and a View button — the same table WooCommerce shows under My Account > Orders.

Usage:

    ```
    [show_wc_orders] shows all of the customer's orders.
    [show_wc_orders order_count=10] shows the 10 most recent orders — replace 10 with any number.
    ```

That is all. There are no settings.

**Details:**

 * Each visitor only ever sees their own orders. Logged-out visitors see nothing.
 * The table is rendered through WooCommerce’s own My Account orders template, so
   your theme’s styling — and any theme override or column filter you already use
   for My Account — applies to the shortcode too.
 * Works with both classic order storage and High-Performance Order Storage (HPOS).

## Ekrānuzņēmumi

[⌊The customer's orders on a regular page — same table as My Account > Orders.⌉⌊
The customer's orders on a regular page — same table as My Account > Orders.⌉[

The customer’s orders on a regular page — same table as My Account > Orders.

[⌊Limiting the output with order_count.⌉⌊Limiting the output with order_count.⌉[

Limiting the output with order_count.

[⌊The shortcode in the block editor.⌉⌊The shortcode in the block editor.⌉[

The shortcode in the block editor.

## Uzstādīšana

 1. Upload the plugin files to the `/wp-content/plugins/wc-show-orders-shortcode` directory,
    or install the plugin through the WordPress plugins screen directly.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress.
 3. Add `[show_wc_orders]` to any page or post.

## BUJ

### Which orders are shown?

The orders of the currently logged-in customer, newest first. Logged-out visitors
see nothing — there is no way to view another customer’s orders through this shortcode.

### The table was empty on my store — is that fixed?

Yes. Version 1.1.0 read orders from the legacy post storage, so on stores using 
High-Performance Order Storage (the WooCommerce default since 8.2) it rendered nothing.
1.2.0 queries orders through the storage-agnostic WooCommerce API and works on both
storage modes.

### Can I change the columns or styling?

The shortcode renders WooCommerce’s own `myaccount/orders.php` template. Anything
that customises the My Account orders table — a theme override of that template,
or the `woocommerce_account_orders_columns` filter — applies here as well.

### Is there pagination?

No. The shortcode shows the `order_count` most recent orders (all orders by default).
For a paginated order history, point customers at My Account > Orders.

### Can I show a login prompt to logged-out visitors instead of nothing?

Not yet — the shortcode intentionally outputs nothing for guests. If you need this,
ask in the support forum.

## Atsauksmes

Par šo spraudni nav atsauksmju.

## Autori un izstrādātāji

“Show Orders Shortcode for WooCommerce” ir atvērtā pirmkoda programmatūra. Šo spraudni
ir veidojuši šādi cilvēki.

Līdzdalībnieki

 *   [ con ](https://profiles.wordpress.org/conschneider/)

[Tulkot “Show Orders Shortcode for WooCommerce&#8221 savā valodā.](https://translate.wordpress.org/projects/wp-plugins/wc-show-orders-shortcode)

### Vai jūs interesē attīstība?

[Pārlūkojiet kodu](https://plugins.trac.wordpress.org/browser/wc-show-orders-shortcode/),
apmeklējiet[ SVN krātuvi ](https://plugins.svn.wordpress.org/wc-show-orders-shortcode/)
vai abonējiet[ attīstības žurnālu](https://plugins.trac.wordpress.org/log/wc-show-orders-shortcode/),
ko izveidojis [RSS](https://plugins.trac.wordpress.org/log/wc-show-orders-shortcode/?limit=100&mode=stop_on_copy&format=rss).

## Izmaiņu žurnāls

#### 1.2.0

 * Fix: orders display again on stores using High-Performance Order Storage (HPOS,
   the WooCommerce default since 8.2). 1.1.0 queried the legacy post storage and
   rendered an empty page there.
 * Improvement: the shortcode now renders the same orders table as My Account > 
   Orders (`myaccount/orders.php`) instead of a template deprecated since WooCommerce
   2.6 — theme overrides and column filters for My Account now apply to the shortcode
   too.
 * Fix: no PHP fatal error when WooCommerce is deactivated while the shortcode is
   still in page content.
 * Hardening: pages are excluded from page caching whenever the table renders (the
   same DONOTCACHEPAGE protection WooCommerce applies to My Account) — this customer-
   specific output must never enter a shared page cache.
 * Hardening: refund records can never appear in the table; invalid `order_count`
   values fall back to showing all orders; `woocommerce_my_account_my_orders_query`
   filter callbacks can no longer break the shortcode’s count or crash the page.
 * The “Recent orders” heading and its `woocommerce_my_account_my_orders_title` 
   filter are preserved from 1.1.0.
 * Note: the table markup now uses WooCommerce’s current classes (`woocommerce-orders-
   table__cell-...`). Custom CSS written against the old bare cell classes (`.order-
   number` etc.) may need updating.
 * Compatibility with High-Performance Order Storage declared; WooCommerce dependency
   declared via Requires Plugins.
 * Housekeeping: License and Text Domain headers, updated minimum versions (WordPress
   6.5, PHP 7.4, WooCommerce 9.5).

#### 1.1.0

Added control statement to check for logged in status.

#### 1.0.0

Initial release.

## Meta

 *  Versija **1.2.0**
 *  Pēdējo reizi atjaunots: **pirms 2 mēnešiem**
 *  Aktīvās instalācijas: **100+**
 *  WordPress versija ** 6.5 vai jaunāka **
 *  Pārbaudīts līdz: **7.0.4**
 *  PHP versija ** 7.4 vai jaunāka **
 *  Valoda
 * [English (US)](https://wordpress.org/plugins/wc-show-orders-shortcode/)
 * Birkas:
 * [My account](https://lv.wordpress.org/plugins/tags/my-account/)[order history](https://lv.wordpress.org/plugins/tags/order-history/)
   [orders](https://lv.wordpress.org/plugins/tags/orders/)[shortcode](https://lv.wordpress.org/plugins/tags/shortcode/)
   [woocommerce](https://lv.wordpress.org/plugins/tags/woocommerce/)
 *  [Papildu skats](https://lv.wordpress.org/plugins/wc-show-orders-shortcode/advanced/)

## Vērtējumi

Vēl nav iesniegta neviena atsauksme.

[Your review](https://wordpress.org/support/plugin/wc-show-orders-shortcode/reviews/#new-post)

[Skatīt visasatsauksmes](https://wordpress.org/support/plugin/wc-show-orders-shortcode/reviews/)

## Līdzdalībnieki

 *   [ con ](https://profiles.wordpress.org/conschneider/)

## Atbalsts

Jums ir kaut kas ko teikt? Vajadzīga palīdzība?

 [Skatīt atbalsta forumu](https://wordpress.org/support/plugin/wc-show-orders-shortcode/)