Developer guide

Add the button to custom cards, open quick view from code, run your scripts inside the modal, and override its templates.

FreePro

Architecture

FreePro
NamespaceSiteryn\SiterynQuickViewSiterynPro\SiterynQuickView
Bootplugins_loaded, then siteryn_qv_loadedOn siteryn_qv_loaded, then siteryn_qv_pro_loaded
Handlessiteryn-qv (CSS and JS)siteryn-qv-pro
Settings optionsiteryn_qv_settingssiteryn_qv_pro_settings

Themes load after siteryn_qv_loaded has fired: hook init from a theme instead.

Template tag

<?php siteryn_qv_button(); ?>            // current product in the loop
<?php siteryn_qv_button( 123 ); ?>       // a specific product
<?php echo siteryn_qv_get_button( 123 ); ?> // return instead of echo

It uses the Button settings, loads the assets and modal, and ignores the "Where to Show" toggles. To reuse an action your theme's cards already fire, register it (before init priority 20):

add_filter( 'siteryn_qv_card_hooks', function ( $hooks ) {
	return $hooks + array( 'mytheme_card_actions' => 20 );
} );

Opening quick view from code

Any element with data-siteryn-qv-product-id opens the modal, including elements added later:

<a href="<?php the_permalink(); ?>" data-siteryn-qv-product-id="123">Quick look</a>
window.siterynQuickView.open( 123, triggerElement ); // triggerElement gets focus back on close
window.siterynQuickView.close();

Pass the parent product ID, not a variation ID. The modal exists only on pages where quick view loaded: shop, categories, product pages, cart and search, or pages that rendered a button. Force it elsewhere:

add_filter( 'siteryn_qv_enqueue_early', function ( $early ) {
	return $early || is_front_page() || is_page( 'catalog' );
} );

JavaScript events

Each event fires as a jQuery event on document.body ((event, detail)) and as a CustomEvent on document (event.detail).

EventdetailWhen
siteryn_qv_openedproductId, modalThe modal opens from closed, before content loads
siteryn_qv_loadedproductId, modal, bodyAfter each product renders (also from cache and when switching products), after WooCommerce's variation form is initialised
siteryn_qv_added_to_cartproductId, fragments, cartHashAfter an add to cart; WooCommerce's added_to_cart also fires
siteryn_qv_closedproductId, modalOn close
jQuery( document.body ).on( 'siteryn_qv_loaded', function ( event, detail ) {
	jQuery( detail.body ).find( '.variations_form' ).trigger( 'my_swatches_init' );
	jQuery( detail.body ).find( '.my-wishlist-btn' ).myWishlist();
} );

Products loaded with AJAX

The click handler is delegated, so buttons inside HTML added by infinite scroll or filters work. On themes whose custom cards rely on the automatic placement, newly loaded cards don't get a button (their buttons are printed in the page footer only for cards on the first load): print siteryn_qv_get_button() inside the card template instead. Theme icon bars on new cards are detected again automatically.

Templates

TemplateVariablesKeep
button.php$product, $settings, $text, $classes, $icon_html, $icon_position, $aria_labeldata-siteryn-qv-product-id
modal.php$settings, $classes, $close_iconEvery data-siteryn-qv-* attribute
quick-view.php$product, $settings, $show_mediaThe product wrapper and .images column

Copy them to your-theme/siteryn-quick-view/. Keep the @version header: outdated copies trigger an admin notice. Most changes are easier with the content hooks.

Endpoints

ActionAccessUse
siteryn_qv_get_productPublic, GET, no nonce (cache-safe)product_id, lang → {html, productId, titleId}
siteryn_qv_add_to_cartPublic, POST, nonce siteryn_qv_add_to_cartproduct_id, quantity, variation_id, attribute_* → {fragments, cartHash, productName, cartUrl}
siteryn_qv_save_settings · siteryn_qv_reset_settings (admin-post) · siteryn_qv_pro_license_actionmanage_woocommerce + nonceSettings screen

The Plugins screen's deactivation survey posts to siteryn_deactivation_feedback (activate_plugins + nonce). No REST routes or blocks. Free has no shortcode; Pro has [siteryn_quick_view].

Data

wp-config constants

ConstantEffect
SCRIPT_DEBUGUnminified CSS
SITERYN_FEEDBACK_ENDPOINTWhere the deactivation survey is sent (default https://siteryn.com/wp-json/siteryn/v1/feedback/deactivation)
SITERYN_QV_PRO_LICENSE_API_BASELicense server URL (default https://siteryn.com/wp-json/siteryn/v1)