Confirmation Page

These hooks let developers customize Confirmation Page in the Cost Calculator.

ccb_confirmation_add_button

This hook allows you to add an additional button, customButtonFunction is specified here, which triggers the hook when the button is pressed - ccb_confirmation_custom_button_action

Parameters:

  • $calc_id(Integer)

Example:

add_action('ccb_confirmation_add_button', 'add_custom_button', 10, 1);

function add_custom_button($calc_id) {
if($calc_id == 257){ //change 257 to the ID of your calculator
echo '<div>
<button class="calc-secondary" @click.prevent="customButtonFunction">
<span>Custom button</span>
</button>
  </div>';
}
}

ccb_customize_confirmation_page

This hook allows you to customize the page - customize text, customize order details view, change the label of all existing buttons in the page, etc.

Parameters:

  • $page_settings(Array)

  • $calc_id(Integer)

Example:

ccb_confirmation_custom_button_styles

This hook allows you to add your own class to a custom button

Parameters:

  • $default_class(String)

  • $calc_id(Integer)

Example:

ccb_confirmation_back_button_styles

This hook allows you to add your own class to the back button

Parameters:

  • $default_class(String)

  • $calc_id(Integer)

Example:

ccb_confirmation_pdf_button_styles

This hook allows you to add your class to the download pdf button.

Parameters:

  • $default_class(String)

  • $calc_id(Integer)

Example:

wp_ajax_ccb_confirmation_pdf_button_action

This hook is triggered when the download pdf button is clicked.

Parameters:

  • none

Example:

wp_ajax_ccb_confirmation_pdf_button_action

This hook triggers when a custom button is clicked.

Parameters:

  • none

Example:

wp_ajax_ccb_confirmation_pdf_button_action

This hook is triggered when the share pdf button is clicked.

Parameters:

  • none

Example:

wp_ajax_ccb_confirmation_back_button_action

This hook is triggered when the button is clicked back.

Parameters:

  • none

Example:

wp_ajax_ccb_confirmation_custom_button_action

This hook is triggered when a custom button is clicked.

Parameters:

  • none

Example:

Last updated

Was this helpful?