List of Shortcode Examples
You can choose different forms of data from the WooCommerce product by changing the “data_attribute” tag to show different forms of data.
You can generate a shortcode easily by using the shortcode generator tool built into the plugin.
Below is an example and explanation of each data attribute you can use.
-
Product Price
Shows the price of the WooCommerce product.
Shortcode Example: [woo-product-shortcodes id=please_select data_attribute=’price’]Output Example: 24.99 -
Product Name
Shows the title of the WooCommerce product.
Shortcode Example: [woo-product-shortcodes id=please_select data_attribute=’name’]Output Example: Pair of Socks -
Product Short Description
Shows the short description of the WooCommerce product.
Shortcode Example: [woo-product-shortcodes id=please_select data_attribute=’short_description’]Output Example: A classic pair of mens socks available is all sizes. -
SKU
Shows the SKU of the WooCommerce product.
Shortcode Example: [woo-product-shortcodes id=please_select data_attribute=’sku’]Output Example: PRD1134 -
Regular Price
Shows the regular price of the WooCommerce product.
Shortcode Example: [woo-product-shortcodes id=please_select data_attribute=’regular_price’]Output Example: 24.99 -
Sale Price
Shows the sale price of the WooCommerce product.
Shortcode Example: [woo-product-shortcodes id=please_select data_attribute=’sale_price’]Output Example: 22.99
No Value: If there is no sale value entered on the product, no text will be shown for this shortcode. -
Price with country formatting
Shows the price of the WooCommerce product with the country formatting of the currency symbol.
Shortcode Example: [woo-product-shortcodes id=please_select data_attribute=’price_formatted’]Output Example: £24.99 -
Regular Price with country formatting
Shows the regular price of the WooCommerce product with the country formatting of the currency symbol.
Shortcode Example: [woo-product-shortcodes id=please_select data_attribute=’regular_price_formatted’]Output Example: £24.99 -
Sale Price with country formatting
Shows the sale price of the WooCommerce product with the country formatting of the currency symbol.
Shortcode Example: [woo-product-shortcodes id=please_select data_attribute=’sale_price_formatted’]Output Example: £22.99
No Value: If there is no sale value entered on the product, no text will be shown for this shortcode.
