Popups for WooCommerce: Add to Cart, Checkout & More provides two shortcodes, both part of the Pro message customization feature. You use them inside the Original HTML Content or Modified HTML Content fields of a customized message, not on regular pages.
Note: both shortcodes belong to Pro and require message customization. Shortcodes on message content are controlled by the Shortcodes and Allow Shortcodes options in the Messages section.
[ttt_pnwc_get_message] #
Returns the current text of a WooCommerce message so you can reuse it inside your customized content. Pass the WooCommerce filter that produces the message.
| Attribute | Description | Default |
|---|---|---|
filter |
The WooCommerce filter hook whose message text you want, for example wc_add_to_cart_message_html or woocommerce_cart_product_cannot_add_another_message. |
Empty |
Example: [ttt_pnwc_get_message filter="wc_add_to_cart_message_html"] outputs the “%s has been added to your cart” message, which you can then wrap with extra content.
[ttt_pnwc_product_image] #
Outputs a product image, handy for showing the added product inside an add-to-cart pop-up.
| Attribute | Description | Default |
|---|---|---|
product_id |
The ID of the product whose image to display. | None |
image_size |
A registered WooCommerce image size. | woocommerce_gallery_thumbnail |
Example: [ttt_pnwc_product_image product_id="{{product_id}}" image_size="woocommerce_thumbnail"]. Combine it with the {{product_id}} template variable so the image matches the product just added.
There is no [ttt_pnwc_modal_template], [ttt_pnwc_advanced_filter], or [ttt_pnwc_modal_settings] shortcode. The modal template, auto-close time, and outside-click behavior are configured in the plugin settings, not through shortcodes.
Ready to set this up? #
These shortcodes are part of Popup Notices Pro message customization. Get Popup Notices Pro.
