![]() |
VOOZH | about |
To find the WooCommerce Products Compare settings follow: admin barβ WooCommerceProductsβ Compare.
Contains general settings for Products Compare page.
Contains settings for comparison buttons and page visual customization.
Set all to theme default
Set all to theme default
Set all to theme default
Set all to theme default
Set all to theme default
Set all to theme default
Contains settings for setup custom text on buttons and in tables.
Contains setting to set JavaScript code that will be executed on some actions.
Public function to get WooCommerce version
return string. woocommerce version
All of these functions are in the BeRocket_Compare_Products class as static functions.
Public function to create comparison page.
Function for initializing scripts.
Function for initializing scripts and settings page in the Admin Bar.
Add option page to admin menu.
Get template part (for templates like the slider).
Default templates are placed in plugins folderwoocommerce-products-compare/templates.
To rewrite the template in your theme folder create folder with name woocommerce-compare-products and place new template with identical name in this folder.
Display Compare button, that is placed under products.
Get all products that are added to comparison list.
return array. array with products id
Public function to check if product is on comparison list
return boolean.
Set customization for buttons and comparison table.
Template that is used in plugin.
Parameters
Usage
<?php
function change_compare_products_get_template_part ( $template, $name ) {
//your code here
return $template;
}
add_filter( 'compare_products_get_template_part', 'change_compare_products_get_template_part', 10, 2 );
?>Filter for widget title.
Parameters
Usage
<?php
function change_compare_products_widget_title ( $title ) {
//your code here
return $title;
}
add_filter( 'compare_products_widget_title', 'change_compare_products_widget_title' );
?>Filter for widget type.
Parameters
Usage
<?php
function change_compare_products_widget_type ( $type ) {
//your code here
return $type;
}
add_filter( 'compare_products_widget_type', 'change_compare_products_widget_type' );
?>Filter for widget is toolbar.
Parameters
Usage
<?php
function change_compare_products_widget_toolbar ( $istoolbar ) {
//your code here
return $istoolbar;
}
add_filter( 'compare_products_widget_toolbar', 'change_compare_products_widget_toolbar' );
?>