Yangra Calculator 1.0.0 has 3 actions and 10 filters, read directly from its source code on Nov 19, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Yangra Calculator fires an action
add_action( 'yangra_calculator_before_calculate', function( $request, $definition ) {
// Your code runs here.
}, 10, 2 );
// Change a value Yangra Calculator is about to use
add_filter( 'yangra_calculator_after_result', function( $value, $result, $definition, $calculation, $post ) {
// Change $value here.
return $value;
}, 10, 5 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Filters HTML shown after a result's value, inside the result, such as a * chart of it. */ apply_filters( 'yangra_calculator_after_result', '', $result, $definition, $calculation, $post ); -
/** * Fires before a calculator is calculated through the REST API, so an add-on * can read what else the view script sent, such as the visitor's date. */ do_action( 'yangra_calculator_before_calculate', $request, $definition ); -
/** * Filters HTML shown at the top of the results area, such as a form visitors * fill in before they see their results. On a multi-step calculator it is on * the last step, with the results. */ apply_filters( 'yangra_calculator_before_results', '', $definition, $post ); -
/** * Filters what the endpoint returns, such as to add what an add-on shows with * the results. The browser engine has the `yangraCalculator.calculated` filter * for the same. */ apply_filters( 'yangra_calculator_calculate_response', $response, $definition, $calculation ); -
/** * Filters the default settings. */ apply_filters( 'yangra_calculator_default_settings', array( 'default_mode' => Repository::MODE_BROWSER, ) ); -
/** * Filters how the inputs are grouped, such as into the steps of a multi-step * calculator. Each group is rendered as a fieldset with the class * `yangra-calculator__group`, its title as the legend when it has one, and is * hidden while all its inputs are. Inputs in no group come after the groups. * No groups, the default, leaves the fields as they are. */ apply_filters( 'yangra_calculator_field_groups', array(), $definition, $post ); -
/** * Fires after the Freemius SDK has been initialised for Yangra Calculator. */ do_action( 'yangra_calculator_fs_loaded' ); -
/** * Fires after Yangra Calculator has registered its services. */ do_action( 'yangra_calculator_loaded', $this ); -
/** * Filters the definition a new calculator starts with. */ apply_filters( 'yangra_calculator_new_definition', $this->example(), $post ); -
/** * Filters sanitized settings before they are saved. Use this to sanitize extra * keys. */ apply_filters( 'yangra_calculator_sanitize_settings', $clean, $input ); -
/** * Filters the folders templates are read from, such as one an add-on brings. */ apply_filters( 'yangra_calculator_template_directories', $this->directories ); -
/** * Filters the templates the picker offers. */ apply_filters( 'yangra_calculator_templates', $templates ); -
/** * Filters what the view script receives, such as to add what an add-on's * script needs. */ apply_filters( 'yangra_calculator_view_config', $this->base_config( $post, $definition, $format, $can_edit ), $definition, $post );
Generated from Yangra Calculator's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: