Smart Coupons provide a powerful, “all-in-one” solution for gift cards, store credits, discount coupons, and vouchers extending the core functionality of WooCommerce coupons.
This doc explains how to display the Store Credit balance anywhere on your WooCommerce store using shortcode.
By default the Store Credit balance is available on the My Account page. Now if you want to show the Store Credit in some places that you would love to show, you can use the following shortcodes.
[wc_sc_balance] (OR) [smart_coupons_balance]
Both shortcodes work identically. Use whichever naming convention you prefer.
Sample usage
↑ Back to topShow the current user’s Store Credit balance with default formatting:
[wc_sc_balance]
Shortcode parameters
↑ Back to topAll parameters are optional. The shortcode works with sensible defaults.
Parameter | Type | Default | Description |
---|---|---|---|
format | string | amount | Display format: amount (formatted with currency) or raw (numeric only). |
label | string | Store Credit | The default text shown before the amount. This gets changed based on the text set under WooCommerce > Settings > Smart Coupons > Labels |
show_label | boolean | true | Whether to show the label text. |
class | string | wc-sc-balance | Custom CSS class for styling. |
Common use cases
↑ Back to topAdd the shortcode to a text or shortcode widget:
Eg;) “Welcome back! You have [wc_sc_balance label="" show_label="false"]
in Store Credit.”
