Actions and Filters
WooCommerce Quick View Pro comes with a number of filters which allow you to customize the plugin's behavior. This article is aimed at developers and if you don't know how to use the filters then you can use our plugin customization service.
Filters
wc_quick_view_pro_shop_loop_button_hook
The hook used to output the Quick View button in the main shop pages (shop, archives and categories). Default: woocommerce_after_shop_loop_item
Arguments
string - The hook name.
Return
string
wc_quick_view_pro_shop_loop_button_hook_priority
The priority to use when registering the Quick View button hook (see wc_quick_view_pro_shop_loop_button_hook
). This is passed to the add_action
call.
Arguments
int - The hook priority (lower = higher priority).
Return
int
wc_quick_view_pro_show_button_for_product
Whether to show the Quick View button for a particular product in your shop. Defaults to true
for all products.
Arguments
boolean - Whether to show the button.
WC_Product - The product we're showing the button for.
Return
boolean
wc_quick_view_pro_button_class
The classes to use for the Quick View button element (space separated). The default is wc-quick-view-button
. It will also include classes button
and alt
if the wc_quick_view_pro_use_default_button_classes
filter is true.
Arguments
string - The CSS class or classes (space-separated).
WC_Product - The product we're showing the button for.
Return
string
wc_quick_view_pro_use_default_button_classes
Whether to use default button classes button
and alt
for the Quick View buttons in the shop. Default: true
Arguments
boolean
Return
boolean
wc_quick_view_pro_hover_button_allowed
Whether the hover Quick View button on the shop and archive pages is enabled or not. This hook is used to override the "Show a Quick View button for each product" global settings.
Arguments
boolean - The global setting for hover button activation
Return
boolean
wc_quick_view_pro_show_button_in_shop
Whether the regular Quick View button on the shop and archive pages is enabled or not. This hook is used to override the "Display Quick View button on hover" global settings.
Arguments
boolean - The global setting for hover button activation
Return
boolean
wc_quick_view_pro_button_text
The text to use for the Quick View button. This filter overrides the text set in the plugin settings.
Arguments
string - The button text.
WC_Product - The product we're showing the button for.
Return
string
wc_quick_view_pro_quick_view_button
The complete HTML to use for the Quick View button.
Arguments
string - The button HTML.
WC_Product - The product we're showing the button for.
Return
string
wc_quick_view_pro_scripts_enabled_on_page
Whether the Quick View Javascript is enabled on the current page. Defaults to true
when viewing the main shop page, or any product taxonomy (category, tag, or attribute).
Arguments
boolean - Whether the scripts are loaded.
Return
boolean
wc_quick_view_pro_product_link_selector
The CSS selector used when the 'Open Quick View by clicking on product name or image in shop' option is enabled in the plugin settings. Default: .woocommerce-loop-product__link
Arguments
string - The CSS selector.
Return
string
wc_quick_view_pro_can_view_quick_view_content
Whether the entire Quick View content (images and product details) can be shown for a given product. Default: true
Arguments
boolean - Whether the content can be shown.
Return
boolean
wc_quick_view_pro_show_product_details
Whether to show or hide the product details section of the Quick View. This is the whole details section, including the product title, description, price and add to cart form. Default: true
Arguments
boolean - Whether to show the details.
Return
boolean
wc_quick_view_pro_show_sale_flash
Whether to show or hide the product sales flash banner in the Quick View, if your theme uses one. Default: true
Arguments
boolean - Whether to show the sales flash.
Return
boolean
wc_quick_view_pro_show_product_title
Whether to show or hide the product name in the Quick View. Default: true
Arguments
boolean - Whether to show the product name.
Return
boolean
wc_quick_view_pro_show_social_sharing
Whether to show or hide the social sharing section in the Quick View, if your theme enables this. Default: true
Arguments
boolean - Whether to show the social sharing section.
Return
boolean
wc_quick_view_pro_modal_container_class
The main Quick View modal class. Default: single-product
Arguments
string - The CSS selector.
WC_Product - The current product.
Return
string
wc_quick_view_pro_quick_view_product_class
The CSS classes to use for the product wrapper within the Quick View. Defaults to the standard WooCommerce product classes (product
, taxable
, etc) plus wc-quick-view-product
Arguments
array - The CSS selectors.
Return
array
wc_quick_view_pro_add_to_cart_params
The parameters to use when adding a product to the cart from the Quick View.
Arguments
array - The cart parameters.
Return
array
wc_quick_view_pro_product_thumbnails_columns
The number of columns to use for the product gallery thumbnails (when enabled) in the Quick View. Default: 5
Arguments
integer - The number of columns.
Return
integer
wc_quick_view_pro_product_gallery_classes
The CSS classes to use for the product gallery (when enabled) in the Quick View. Default: wc-quick-view-product-gallery woocommerce-product-gallery woocommerce-product-gallery--with-images images woocommerce-product-gallery--columns-5
Arguments
string - The CSS classes.
Return
string
wc_quick_view_pro_product_image_thumbnail_html
The HTML for a product gallery image shown in the Quick View.
Arguments
string - The product image gallery HTML.
Return
string
wc_product_table_data_quick_view
The HTML for the Quick View button when displayed inside a product table (only applies when using the WooCommerce Product Table plugin).
Arguments
string - The Quick View button HTML.
Return
string
wc_quick_view_pro_enable_product_link
Change the value for the "Open the Quick View by clicking the product name or image" setting for specific pages.
Arguments
Boolean
Return
Boolean
Actions
wc_quick_view_pro_load_scripts
Fires when the Quick View scripts are enqueued (loaded).
wc_quick_view_pro_register_scripts
Fires when the Quick View scripts are registered.
wc_quick_view_pro_before_quick_view_template
Fires just before the main Quick View template is included.
Arguments
WC_Product - The product to display in the Quick View.
wc_quick_view_pro_after_quick_view_template
Fires just after the main Quick View template is included.
Arguments
WC_Product - The product to display in the Quick View.
wc_quick_view_pro_before_quick_view
Fires in the Quick View template, before the main <div> element.
Arguments
WC_Product - The product to display in the Quick View.
wc_quick_view_pro_after_quick_view
Fires in the Quick View template, after the main closing </div> element.
Arguments
WC_Product - The product to display in the Quick View.
wc_quick_view_pro_before_quick_view_product
Fires in the Quick View template, after the main <div> but before the any product details are shown.
Arguments
WC_Product - The product to display in the Quick View.
wc_quick_view_pro_after_quick_view_product
Fires in the Quick View template, before the main closing </div>.
Arguments
WC_Product - The product to display in the Quick View.
wc_quick_view_pro_quick_view_before_product_details
Fires in the Quick View template, before the product details section. The product gallery is attached to this hook.
Arguments
WC_Product - The product to display in the Quick View.
wc_quick_view_pro_quick_view_product_details
Fires in the Quick View template to show all the product details.
Arguments
WC_Product - The product to display in the Quick View.
wc_quick_view_pro_quick_view_after_product_details
Fires in the Quick View template, after the product details section.
Arguments
WC_Product - The product to display in the Quick View.
wc_quick_view_pro_quick_view_content_hidden
Fires in the Quick View template when the product content cannot be displayed (e.g. if the product is hidden or protected).
Arguments
WC_Product - The product to display in the Quick View.