[wcj_product_image]

Display product image

Description

[wcj_product_image] shortcode displays WooCommerce product image.

Args

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) Make shortcode results visible to everyone (all), or to admin only (admin).

Default: all
product_id
(optional) The integer ID for a product.

Default: The current product ID, if exists
image_size
(optional) Possible values are shop_thumbnail, shop_catalog or shop_single.

Default: shop_thumbnail

Examples

This will display main product page image.

[wcj_product_image image_size="shop_single"]
Accessible through:
  • [wcj_product_image]
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

2 Comments

  1. Ayesha March 3, 2015 at 10:37 am #

    Hi,
    Thank you for adding this!
    I can’t get images to show up 🙁
    My code is:

    Order items

    [wcj_order_items_table table_class="pdf_invoice_items_table"
    columns="wcj_product_image|item_number|item_name|item_quantity|line_total_tax_excl"
    columns_titles="Image|#|Item|Qty|Total"
    columns_styles="width:10%;|width:5%;|width:60%;|width:8%;|width:17%;"]

    Reply

    • WooJetpack Support Team March 4, 2015 at 3:53 pm #

      Hi Ayesha,

      [wcj_product_image] shortcode just displays product image and not intended to use with PDF Invoicing module.

      For images to show up in invoice’s order table you should use item_thumbnail (and not wcj_product_image) option with [wcj_order_items_table] shortcode.

      Should be something like this:
      [wcj_order_items_table table_class="pdf_invoice_items_table"
      columns="item_thumbnail|item_number|item_name|item_quantity|line_total_tax_excl"
      columns_titles="Image|#|Item|Qty|Total"
      columns_styles="width:10%;|width:5%;|width:60%;|width:8%;|width:17%;"]

      Best regards,
      Tom