[wcj_product_excerpt]

Display WooCommerce product excerpt

Description

[wcj_product_excerpt] shortcode displays WooCommerce product excerpt.

Args

excerpt_length
(optional) Excerpt length in words.

Default: None
product_id
(optional) The integer ID for an product.

Default: The current product ID, if exists
before
(optional) Text to place before the content. If content is empty this argument is ignored.

Default: None
after
(optional) Text to place after the content. If content is empty this argument is ignored.

Default: None
visibility
(optional) User visibility. Possible values are WordPress user roles (including custom), e.g. administrator, shop_manager, customer etc.

Default: all
location
(optional) Make shortcode results visible only to customers from specific country (by user IP). Value is two letter country code.

Default: all
site_visibility
(optional) Restrict shortcode output to some pages only. Possible values: single, page, archive.

Default: None
wpml_language
(optional) Restrict shortcode output to certain WPML language only. Possible values are two letter language codes. Can be comma separated list.

Default: None
not_wpml_language
(optional) Restrict shortcode output to exclude certain WPML languages. Possible values are two letter language codes. Can be comma separated list.

Default: None

Examples

[wcj_product_excerpt excerpt_length="20" before="Product excerpt: "]
Accessible through:
  • [wcj_product_excerpt]
Tested on WooCommerce 3.0.4 and WordPress 4.7.4
Plugin can be downloaded here. If there are any locked fields in the module, you will need to get Booster Plus to unlock them.

Leave a Reply

Comments

1 Comment

  1. Joris Meermans November 17, 2015 at 9:03 pm #

    Hi!

    The shortcode [wcj_product_excerpt] just don’t work on my site. I really need it to be displayed on my pdf invoice. Is it maybe because I’m using a translated version of WordPress (Dutch instead of English), or maybe because I’m using variations? Some other codes do work (for example [wcj_product_price] ), but some don’t…
    Any ideas?

    Reply