Skip to content

Shortcodes

23 shortcodes for displaying legal data, product information and storefront modules anywhere.

Displays GPSR (General Product Safety Regulation) information for a product.

Parameters:

ParameterTypeDefaultDescription
product_idint(current)Product ID
fieldsstringallFields to display
layoutstringlistLayout: list, table, inline

Example:

[polski_gpsr product_id="123" fields="manufacturer,contact,safety" layout="table"]

In a PHP template:

echo do_shortcode('[polski_gpsr]'); // On a product page - automatically gets the ID

Displays the lowest price from the last 30 days (Omnibus Directive).

Parameters:

ParameterTypeDefaultDescription
product_idint(current)Product ID
daysint30Number of days back
labelstring(default)Label text
show_datestringnoShow lowest price date

Example:

[polski_omnibus_price product_id="456" label="Lowest price from 30 days:" show_date="yes"]

Displays the contract withdrawal form.

Parameters:

ParameterTypeDefaultDescription
order_idint(empty)Pre-fill with order number
show_infostringyesShow withdrawal rights information
redirectstring(empty)Redirect URL after submission

Example:

[polski_withdrawal_form show_info="yes"]

Dedicated withdrawal page:

Create a page with slug withdrawal-from-contract and insert:

<h2>Contract withdrawal form</h2>
<p>According to the Consumer Rights Act, you have 14 days to withdraw from the contract.</p>
[polski_withdrawal_form]

Displays the illegal content reporting form (Digital Services Act).

Parameters:

ParameterTypeDefaultDescription
product_idint(empty)Product ID to report
categoriesstringallReport categories
show_infostringyesShow DSA information

Example:

[polski_dsa_report categories="illegal_content,counterfeit,safety"]

Displays VAT and delivery cost information.

Parameters:

ParameterTypeDefaultDescription
textstringPrice includes VAT. Delivery costs calculated at checkout.Information content
link_textstringDelivery costsLink text
link_urlstring(empty)Cost page URL

Example:

[polski_tax_notice text="Gross price includes 23% VAT." link_text="Check delivery costs" link_url="/delivery/"]

Displays the product unit price (e.g. price per kg, liter).

Parameters:

ParameterTypeDefaultDescription
product_idint(current)Product ID
formatstringautoFormat: auto, per_kg, per_l, per_m, per_unit

Example:

[polski_unit_price product_id="789" format="per_kg"]

Displays estimated delivery time.

Parameters:

ParameterTypeDefaultDescription
product_idint(current)Product ID
formatstringrangeFormat: range, exact, text
labelstringDelivery time:Label

Example:

[polski_delivery_time label="Ships in:" format="range"]

Displays manufacturer information.

Parameters:

ParameterTypeDefaultDescription
product_idint(current)Product ID
fieldsstringallFields: name, address, url, logo
linkstringyesLink to manufacturer page

Example:

[polski_manufacturer fields="name,logo" link="yes"]

Displays the nutrition facts table (for food products).

Parameters:

ParameterTypeDefaultDescription
product_idint(current)Product ID
perstring100gValues per: 100g, 100ml, serving
layoutstringtableLayout: table, list, compact

Example:

[polski_nutrients per="serving" layout="compact"]

Displays the allergen list (for food products).

Parameters:

ParameterTypeDefaultDescription
product_idint(current)Product ID
highlightstringboldHighlighting: bold, color, icon
layoutstringinlineLayout: inline, list

Example:

[polski_allergens highlight="bold" layout="list"]

Displays the wishlist table.

Parameters:

ParameterTypeDefaultDescription
columnsstringallColumns to display
max_itemsint50Product limit
show_emptystringyesEmpty list message

Example:

[polski_wishlist columns="image,name,price,add_to_cart" max_items="20"]

Displays the product comparison table.

Parameters:

ParameterTypeDefaultDescription
columnsstringallFeatures to display
hide_similarstringnoHide identical features
show_removestringyesRemove button

Example:

[polski_compare hide_similar="yes"]

Displays the AJAX search with suggestions.

Parameters:

ParameterTypeDefaultDescription
placeholderstringSearch products...Placeholder text
widthstring100%Field width
show_iconstringyesMagnifying glass icon
show_catstringnoCategory filter
limitint8Suggestion limit

Example:

[polski_ajax_search placeholder="What are you looking for?" show_cat="yes" limit="10"]

Displays AJAX filters for product filtering.

Parameters:

ParameterTypeDefaultDescription
filtersstringallFilter types
stylestringexpandedStyle: expanded, compact, accordion
show_countstringyesProduct counters
show_resetstringyesReset button
columnsint1Filter columns
ajaxstringyesAJAX mode

Example:

[polski_ajax_filters filters="category,price,pa_color,stock" style="accordion"]

Displays a product carousel.

Parameters:

ParameterTypeDefaultDescription
typestringlatestType: related, sale, featured, bestsellers, latest, category, ids
limitint8Product limit
columnsint4Desktop columns
columns_tabletint2Tablet columns
columns_mobileint1Mobile columns
categorystring(empty)Category slug
idsstring(empty)Product IDs
arrowsstringyesNavigation arrows
dotsstringnoPagination dots
autoplaystringnoAutoplay
autoplay_speedint5000Pause in ms
titlestring(empty)Title
orderbystringdateSort by
orderstringDESCDirection

Example:

[polski_product_slider type="sale" limit="12" title="Promotions" arrows="yes" dots="yes"]

Displays the Nutri-Score rating of a food product.

Parameters:

ParameterTypeDefaultDescription
product_idint(current)Product ID
sizestringmediumSize: small, medium, large

Example:

[polski_nutri_score product_id="321" size="large"]

Displays a purchase button with an EU directive-compliant label.

Parameters:

ParameterTypeDefaultDescription
textstringZamowienie z obowiazkiem zaplatyButton text
classstring(empty)Additional CSS class

Example:

[polski_checkout_button text="Kupuje i place" class="my-checkout-btn"]

Displays legal checkboxes outside checkout (e.g. on registration page).

Parameters:

ParameterTypeDefaultDescription
locationstringcustomLocation: checkout, registration, contact, custom
idsstring(empty)Checkbox IDs to display

Example:

[polski_legal_checkboxes location="registration"]

Displays a NIP field with real-time validation (VIES/GUS API).

Parameters:

ParameterTypeDefaultDescription
requiredstringnoRequired field
autofillstringyesAutomatic company data fill
labelstringNIPField label

Example:

[polski_nip_field required="yes" autofill="yes" label="Company NIP number"]

Displays verified environmental product information (anti-greenwashing).

Parameters:

ParameterTypeDefaultDescription
product_idint(current)Product ID
fieldsstringallFields: claims, certifications, evidence

Example:

[polski_greenwashing_info fields="claims,certifications"]

Displays a security incident reporting form (CRA).

Parameters:

ParameterTypeDefaultDescription
show_infostringyesCRA information

Example:

[polski_security_incident show_info="yes"]

Displays a verified purchase badge on a review.

Parameters:

ParameterTypeDefaultDescription
textstringVerified purchaseBadge text
iconstringcheckmarkIcon: checkmark, shield

Example:

[polski_verified_badge text="Confirmed order" icon="shield"]

All shortcodes can be called in PHP templates:

// Single shortcode
echo do_shortcode('[polski_omnibus_price]');
// Shortcode with parameters
echo do_shortcode('[polski_product_slider type="featured" limit="6"]');
// Conditional display
if (shortcode_exists('polski_gpsr')) {
echo do_shortcode('[polski_gpsr]');
}

In the Gutenberg editor, use the Shortcode block and paste the desired shortcode. Alternatively, many of these shortcodes have dedicated Gutenberg blocks with a preview in the editor.

Report issues: github.com/wppoland/polski/issues

This page is for informational purposes only and does not constitute legal advice. Consult a lawyer before implementation. Polski for WooCommerce is open source software (GPLv2) provided without warranty.