Documentation
GeoBlock Pro
Shortcode

Shortcode

[geoblock_product_message]

Renders the configured restriction message for a specific product anywhere on your site.

AttributeTypeRequiredDescription
idintegerYesWooCommerce product ID
classstringNoAdditional CSS class(es) for the wrapper <div>

Example:

[geoblock_product_message id="42" class="my-custom-notice"]

The shortcode outputs nothing if the current visitor is not restricted for that product. Use it in page builders, widgets, or custom page templates to surface the restriction message in non-standard locations.