> For the complete documentation index, see [llms.txt](https://kb.moomoo.agency/uni-cpo-4-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.moomoo.agency/uni-cpo-4-documentation/for-developers/actions-filters.md).

# Actions & Filters

## On the single product page

Filter: `uni_cpo_ajax_formula_before_formula_eval`

�Arguments: `$main_formula`, `$product_data`, `$product_id`, `$filtered_form_data`

**Pro version only! Starting from 4.7.3.**

Allows filtering formula just before it will be evaluated.

Filter: `uni_cpo_ajax_variables_before_formula_eval`

�Arguments: `$variables`, `$product_data`, `$product_id`,  `$filtered_form_data`

�

**Pro version only! Starting from 4.7.3.**

Allows filtering variables which will be used in the formula just before the formula will be evaluated.

Filter: `uni_cpo_ajax_calculated_price`

�Arguments: `$price_calculated`, `$product`, `$filtered_form_data`

Allows modifying the price calculated.

Filter: `uni_cpo_ajax_calculation_price_vars_filter`

�Arguments: `$price_vars`, `$formatted_vars`, `$product_id`

Allows modifying the array of `price_vars`. This data is being returned as a part of response after ajax request.

Filter: `uni_cpo_ajax_calculation_price_extra_data_filter`

�Arguments: `$extra_data`, `$formatted_vars`, `$product_id`

Allows modifying the array of `extra_data`. This data is being returned as a part of response after ajax request.

Action: `uni_cpo_before_render_content`

�Just before the builder container element.

Action: `uni_cpo_before_render_form_fields`

�Just after the builder container element.

Filter: `uni_cpo_product_post_data`

�Arguments: `$post_data`, `$product_data`

�An array of POST data. Is being used for inline editing functionality

Action: `uni_cpo_after_render_form_fields`

�Just before the builder container element closing tag.

Action: `uni_cpo_after_render_content`

�Just after the builder container element closing tag.

## Hooks related to weight/dimensions

Filter: `uni_cpo_in_cart_calculated_weight`

�Arguments: `$weight`, `$product`, `$filtered_form_data`

�Filter: `uni_cpo_in_cart_calculated_length`

�Arguments: `$length`, `$product`, `$variables`

Filter: `uni_cpo_in_cart_calculated_width`

�Arguments: `$width`, `$product`, `$variables`

Filter: `uni_cpo_in_cart_calculated_height`

�Arguments: `$height`, `$product`, `$variables`

## Hooks related to NOVs

Filter: `uni_cpo_nov_variable_value`

�Arguments: `$value`, `$product_data`, `$variables`, `$nov_name`

## In the cart

Filter: `uni_cpo_in_cart_formula_before_formula_eval`

�Arguments: `$main_formula`, `$product_data`, `$product_id`

**Pro version only! Starting from 4.7.3.**

Allows filtering formula just before it will be evaluated.

Filter: `uni_cpo_in_cart_variables_before_formula_eval`

�Arguments: `$variables`, `$product_data`, `$product_id`

**Pro version only! Starting from 4.7.3.**

Allows filtering variables which will be used in the formula just before the formula will be evaluated.

Filter: `uni_cpo_in_cart_calculated_price`

�Arguments: `$price_calculated`, `$product`, `$filtered_form_data`

Allows modifying the price calculated.
