Select Page

All of these functions are in the BeRocket_Compare_Products class as static functions.

activation()

Public function to create comparison page.

init ()

Function for initializing scripts.

admin_init ()

Function for initializing scripts and settings page in the Admin Bar.

options ()

Add option page to admin menu.

br_get_template_part( $name = ” )

Get template part (for templates like the slider).

  • $name – template name

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.

get_compare_button ()

Display Compare button, that is placed under products.

get_all_compare_products ()

Get all products that are added to comparison list.

return array. array with products id

is_set_cookie( $id )

Public function to check if product is on comparison list

  • $id – product id

return boolean.

wp_head_style ()

Set customization for buttons and comparison table.