> 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://kb.moomoo.agency/uni-cpo-4-documentation/for-developers/actions-filters.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
