---
title: MSRP Shortcodes
description: "The [alg_wc_msrp_wpml] shortcode shows or hides content by site language in WooCommerce MSRP templates."
url: "https://wpfactory.com/docs/shortcodes-msrp/"
updated: "2026-09-27"
category: Shortcodes
---

# MSRP Shortcodes

[MSRP (RRP) Pricing for WooCommerce](https://wpfactory.com/item/msrp-for-woocommerce/) registers one shortcode, `[alg_wc_msrp_wpml]`. It shows or hides its inner content based on the active site language, which is useful inside the plugin's template fields when you run WPML or Polylang.

**Note:** MSRP Pricing does not use shortcodes to output the MSRP itself. The MSRP is rendered automatically next to the product price, controlled by the display settings under **WPFactory > MSRP** (also reachable at **WooCommerce > Settings > MSRP**). Earlier versions of this article listed product, savings and country/currency shortcodes that the plugin does not provide; those have been removed.

### The language shortcode

`[alg_wc_msrp_wpml]` wraps content you want shown only for, or only outside of, a set of languages. Place it inside the **Final Template**, **Template if no MSRP is defined**, or **Cart total savings Template** fields (template editing requires Pro).

| Attribute | Meaning | Default |
| --- | --- | --- |
| `lang` | Show the content only when the active language is in this comma-separated list of codes. | empty |
| `not_lang` | Hide the content when the active language is in this comma-separated list of codes. | empty |

### Examples

```
[alg_wc_msrp_wpml lang="en"]MSRP[/alg_wc_msrp_wpml]
[alg_wc_msrp_wpml lang="de"]UVP[/alg_wc_msrp_wpml]
[alg_wc_msrp_wpml not_lang="fr"]MSRP[/alg_wc_msrp_wpml]
```

The first two lines let you show a different MSRP label per language inside the same template. The third shows its content in every language except French. When WPML or Polylang is not active, content wrapped with a `lang` attribute is hidden.

### Reading MSRP in code

If you need the MSRP value in a theme template or snippet rather than a shortcode, use the helper function `alg_wc_msrp_get_product_msrp()`. It returns the MSRP, the savings amount, or the savings percentage for a product. See the [MSRP developer hooks, filters and functions reference](https://wpfactory.com/docs/msrp-for-woocommerce/) for its parameters.

### Get more control

Editing the template fields where this shortcode is used is a Pro feature. [MSRP (RRP) Pricing for WooCommerce](https://wpfactory.com/item/msrp-for-woocommerce/) Pro unlocks full template editing along with MSRP by country, by currency and by user role. [See what Pro unlocks](https://wpfactory.com/item/msrp-for-woocommerce/).

Related articles

- [How to Set MSRP on Variable Products and Format the Range](https://wpfactory.com/docs/woocommerce-msrp-variable-products/)
- [How to Show MSRP to Specific User Roles Only](https://wpfactory.com/docs/woocommerce-msrp-by-user-role/)
- [How to Bulk Change Product Prices with the MSRP Price Converter](https://wpfactory.com/docs/woocommerce-bulk-msrp-price-converter/)
- [MSRP Template Placeholders Reference](https://wpfactory.com/docs/msrp-template-placeholders-reference/)
- [MSRP Comparison Looks Wrong – Prices not Displayed as Expected](https://wpfactory.com/docs/msrp-comparison-looks-wrong-prices-not-displayed-as-expected/)
