Skip to content

Latest commit

 

History

History
31 lines (17 loc) · 1.16 KB

File metadata and controls

31 lines (17 loc) · 1.16 KB

Product additional information shortcode
(For WooCommerce)

Display additional product information as weight, dimensions and product attributes anywhere.

The shortcode has an unique optional "id" argument (the product id). If the "id" argument is not defined, the shortcode will try to get the post ID (checking that is a product Id).

SHORTCODE USAGE

  1. With a defined "id" argument (the product ID):

    [product_additional_information id='37']

    or in php:

    echo do_shortcode("[product_additional_information id='37']");

  2. Without a defined "id" argument (In an existing product page when "additional information" product tab is removed for example):

    [product_additional_information]

    or in php:

    echo do_shortcode("[product_additional_information]");

You will get something like:

alt text

Based on my Stack Overflow answer: WooCommerce product additional information shortcode

Made on Stack Overflow on 2018-05-02 (Updated on 2019-04-22)