[wcj_product_available_variations]

Display WooCommerce product available variations table

Description

[wcj_product_available_variations] shortcode displays WooCommerce product available variations table. Shortcode has no required attributes, optional attributes are listed below.

Args

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_available_variations]

Output

Small $36.30
Medium $181.50
Big $242.00
Accessible through:
  • [wcj_product_available_variations]
Tested on WooCommerce 3.0.7 and WordPress 4.7.5
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. Ian Melia February 26, 2017 at 11:27 pm #

    Hi

    We have just Upgraded Plugins TM Woocommerce Package from (1.1.13) > to (1.2.0)

    We followed the following process for a product i.e. ‘Hazelnuts in Milk and Dark Chocolate’ to allow the customer to order Dark or Milk chocolate

    1. Products > Attributes > Name: Chocolate Type > Add Attribute > Select Chocolate Type and click Configure Terms (gear icon) > Add New Chocolate Type (i.e. Dark , Milk & White)

    2. Products > Select a product i.e. Hazelnuts in Milk and Dark Chocolate > Change Product Data from Simple product to Variable product > Attributes > Select Chocolate Type > Click Add > Click Select all Value(s) and delete any not required > Check Visible on the product page > Check Used for variations > Save attributes > Update

    However, when we view the Product i.e. http://ecbiz218.inmotionhosting.com/~column7/carouselbakewell.co.uk/product/hazelnuts-in-milk-and-dark-chocolate/

    Whilst the Chocolate Type is displayed correctly in dropdown, with Dark & Milk options, when we select any option i.e. Dark, we get the following message

    Sorry, this product is unavailable. Please choose a different combination.

    If we go to WooCommerce > Booster Tools > Products Atts, General, All Products and All Attributes is set to DISABLED

    How do we get this enabled?

    Regards

    Ian

    Reply