Hooks reference
Every action and filter the plugins provide, when it runs, and examples you can copy.
FreePro
Modal content
| Hook | Arguments | Use |
siteryn_qv_product_media (action) | $product, $settings | Image column: sale badge 5, image 10 |
siteryn_qv_product_summary (action) | $product, $settings | Details: title 5, rating 10, price 15, excerpt 20, add to cart 30, meta 40, details link 50. With Pro the parts move to 10, 20 … 100 in the chosen order |
siteryn_qv_show_media | $show, $product, $settings | Show the image column |
siteryn_qv_image_size | $size, $product, $settings | Image size (default woocommerce_single) |
siteryn_qv_modal_before_body · _after_body (actions) | $settings | Around the modal body |
siteryn_qv_modal_classes | $classes, $settings | Modal classes |
| Filter | Arguments | Use |
siteryn_qv_show_button | $show, $product, $context | Context: archive, related, other, template_tag |
siteryn_qv_button_classes | $classes, $product, $context | Button classes |
siteryn_qv_button_hook | [hook, priority], $position | The loop hook the button uses |
siteryn_qv_card_hooks | [action => priority] | Extra theme card actions that render the button |
AJAX
| Hook | Arguments | Use |
siteryn_qv_product_viewable | $viewable, $product | Allow or block a product (also blocks add to cart from the modal) |
siteryn_qv_before_product_response (action) | $product | Before the modal HTML is built |
siteryn_qv_product_response | $response, $product | The JSON response |
siteryn_qv_ajax_product_types | $types | Types added without reload (default simple, variable) |
Assets, templates & settings
| Hook | Use |
siteryn_qv_enqueue_early | Load quick view in the page head on more pages |
siteryn_qv_enqueue_assets (action) | Enqueue your assets wherever quick view loads |
siteryn_qv_script_config | $config, $settings → window.siterynQv; add iconBarSelectors for your theme's image icon bar |
siteryn_qv_locate_template · siteryn_qv_before_template · _after_template | Template path ($path, $template_name) · output around templates ($template_name, $args) |
siteryn_qv_settings_get_all | Change Free settings at runtime |
siteryn_qv_settings_sections · _fields · _save_redirect · _reset_actions · _nav_* · _description | Extend the settings screen |
siteryn_qv_settings_main_after · siteryn_qv_settings_sidebar (actions) | $section (always general): add content under the General tab's form · in its sidebar |
siteryn_qv_system_status_cards · siteryn_qv_admin_icons | System Status cards · admin icons |
siteryn_dashboard_plugins · siteryn_deactivation_feedback_endpoint | Plugins listed on the shared Siteryn menu page · where the deactivation survey is sent (shared by all Siteryn plugins) |
siteryn_qv_loaded · siteryn_qv_upgrade (actions) | Booted ($plugin) · updated ($old_version, $new_version) |
Pro
| Hook | Arguments | Use |
siteryn_qv_pro_loaded · siteryn_qv_pro_upgrade (actions) | $plugin · $old, $new | Booted · updated |
siteryn_qv_pro_gallery_image_ids | $ids, $product | Gallery images (before the maximum) |
siteryn_qv_pro_related_ids | $ids, $product, $source | Suggested products |
siteryn_qv_pro_script_config | $config, $settings | window.siterynQvPro |
siteryn_qv_pro_settings_get_all | $settings | Pro settings at runtime |
siteryn_qv_pro_license_active | $active | License state used by features |
Examples
Add something between the price and description
add_action( 'siteryn_qv_product_summary', function ( $product, $settings ) {
echo '<div class="my-qv-wishlist">' . do_shortcode( '[my_wishlist_button id="' . absint( $product->get_id() ) . '"]' ) . '</div>';
}, 17, 2 ); // with Pro, price is at 30: use 35
Remove a part (with or without Pro)
add_action( 'init', function () {
$callback = array( \Siteryn\SiterynQuickView\Frontend::class, 'render_meta' );
$priority = has_action( 'siteryn_qv_product_summary', $callback );
if ( false !== $priority ) {
remove_action( 'siteryn_qv_product_summary', $callback, $priority );
}
}, 30 ); // after Pro reorders the parts at priority 25
No button for out-of-stock products
add_filter( 'siteryn_qv_show_button', function ( $show, $product, $context ) {
return 'template_tag' === $context ? $show : ( $show && $product->is_in_stock() );
}, 10, 3 );
No quick view for a category
add_filter( 'siteryn_qv_product_viewable', function ( $viewable, $product ) {
return $viewable && ! has_term( 'wholesale', 'product_cat', $product->get_id() );
}, 10, 2 );
Your script wherever quick view loads
add_action( 'siteryn_qv_enqueue_assets', function () {
wp_enqueue_script( 'my-swatches', get_theme_file_uri( 'js/swatches.js' ), array( 'siteryn-qv' ), '1.0', true );
} );
Detect your theme's image icon bar
add_filter( 'siteryn_qv_script_config', function ( $config ) {
$config['iconBarSelectors'] = array( '.mytheme-card__tools' );
return $config;
} );
Pro: four gallery images, cross-sells only
add_filter( 'siteryn_qv_pro_gallery_image_ids', function ( $ids ) {
return array_slice( $ids, 0, 4 );
} );
add_filter( 'siteryn_qv_pro_related_ids', function ( $ids, $product ) {
return $product->get_cross_sell_ids();
}, 10, 2 );