Table of Contents
Product XML Feeds Manager for WooCommerce builds each feed from shortcodes placed inside your XML templates. This reference lists the available shortcodes by topic: dimensions, taxonomies, pricing, images, custom fields and more. Every shortcode is available in the free version, and every one accepts the shared global attributes (such as before, after, on_empty and cdata).
Dimensions #
[alg_product_weight]: the product weight.[alg_product_length]: the length. Attributes:to_unit(convert units),round,precision. Example:[alg_product_length to_unit="cm" round="yes" precision="2"].[alg_product_width]and[alg_product_height]: same attributes as length.[alg_product_dimensions]: length x width x height.
Taxonomies #
[alg_product_tags]: product tags. Attributes:add_links,sep.[alg_product_categories]: linked category list.[alg_product_categories_names]: category names, with asepseparator.[alg_product_categories_urls]: category URLs.[alg_product_categories_ids]: category IDs.[alg_product_terms]: terms from any taxonomy. Attributes:taxonomy,sep,orderby(name, parent_id, term_id, hierarchy). Example:[alg_product_terms taxonomy="product_brand" orderby="name"].
Taxes and shipping #
[alg_product_tax_class]: the tax class.[alg_product_shipping_class]: the shipping class. Example with a fallback:[alg_product_shipping_class on_empty="Standard"].
Stock #
[alg_product_stock_quantity]: the stock quantity.[alg_product_stock_availability]: the availability text. Attributes:true_label,false_label,remove_number. Example:[alg_product_stock_availability true_label="In stock" false_label="Sold out"].
Price and currency #
[alg_shop_currency]: the shop currency code.[alg_product_price]: the active price. Attributes includemultiply_by,sum_with,hide_currency,variable_price_type(range, min, max) anddecimal_padding. Example:[alg_product_price multiply_by="1.25"].[alg_product_sale_price],[alg_product_regular_price],[alg_product_price_including_tax],[alg_product_price_excluding_tax]: same attributes as[alg_product_price].[alg_product_you_save]and[alg_product_you_save_percent]: savings amount and percentage. Attributes:hide_if_zero,hide_currency.
Title and descriptions #
[alg_product_title],[alg_product_name],[alg_product_formatted_name]: product title variants.[alg_product_excerpt]and[alg_product_short_description]: short description. Attribute:length.[alg_product_description]: the full description.
Images #
[alg_product_image_url]: main image URL. Attribute:image_size(for examplefull,thumbnail).[alg_product_gallery_image_url]: a gallery image URL. Attributes:image_nr, plusbefore/afterto wrap the output.
Custom fields #
[alg_product_meta]: a product meta value. Attribute:name(the meta key). Example:[alg_product_meta name="_my_field"].[alg_product_custom_field]: a custom field value, samenameattribute.
Attributes #
[alg_product_list_attributes]: a list of all attributes.[alg_product_list_attribute]: a single attribute. Attribute:name. Example:[alg_product_list_attribute name="size"].
Formatting #
[alg_format_date]: formats the wrapped value as a date. Attribute:format. Example:[alg_format_date format="m-d-Y"][alg_product_meta name="_my_date"][/alg_format_date].[alg_format_number]: formats the wrapped value as a number. Attributes:decimals,dec_point,thousands_sep.[alg_to_timestamp]: converts the wrapped date string to a timestamp.
Variations #
[alg_product_available_variations]: available variations. Attributes:sep,sep2,sep3.
General #
[alg_current_datetime]: the current date and time. Attribute:datetime_format.[alg_product_id],[alg_product_type],[alg_product_url],[alg_product_sku]: product identifiers.[alg_product_total_sales]: total sales. Attributes:hide_if_zero,offset.[alg_product_average_rating]: the average rating.[alg_product_time_since_last_sale]: time since the last sale. Attributes:order_status(defaultwc-completed),days_to_cover(default 90).[alg_product_function]: the result of an allow-listedWC_Productmethod. Attribute:function. Example:[alg_product_function function="get_description"]. See the Developer hooks and filters reference for the allow-list.
Need a hand? #
All of these shortcodes are free. Our team answers every ticket on the Product XML Feeds support forum.