Product Options and Price Calculation Formulas for WooCommerce 4.9.71 has 29 actions and 79 filters, read directly from its source code on Nov 18, 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 Product Options and Price Calculation Formulas for WooCommerce fires an action
add_action( 'after_cpo_delete_content', function( $product_id ) {
// Your code runs here.
}, 10, 1 );
// Change a value Product Options and Price Calculation Formulas for WooCommerce is about to use
add_filter( 'uni_wrapper_attributes_for_option', function( $wrapper_attributes, $slug, $id ) {
// Change $wrapper_attributes here.
return $wrapper_attributes;
}, 10, 3 );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
-
apply_filters( 'uni_wrapper_attributes_for_option', $wrapper_attributes, $slug, $id ); -
do_action( "uni_cpo_before_{$this->object_type}_object_save", $this, $this->data_store ); -
apply_filters( 'uni_cpo_custom_attributes', $attributes ); -
apply_filters( 'uni_cpo_ajax_calculation_price_extra_data_filter', array( 'order_product' => 'disabled', ), $formatted_vars, $product_id ); -
apply_filters( 'uni_cpo_ajax_calculation_price_tag_disabled_filter', uni_cpo_price( $price_display ), $price_display, $formatted_vars, $product_id ); -
apply_filters( 'uni_cpo_image_selector', $css_array_image_tag, $product_data ); -
apply_filters( 'uni_cpo_price_selector', $css_array_price_tag, $product_data ); -
apply_filters( 'uni_cpo_thumbs_selector', $css_array_thumbs_tag, $product_data ); -
do_action( 'after_cpo_delete_content', $product_id ); -
do_action( 'after_cpo_get_content', $product_id, $content ); -
do_action( 'after_cpo_save_content', $product_id ); -
do_action( 'after_cpo_update_content', $product_id ); -
do_action( 'before_cpo_delete_content', $product_id ); -
do_action( 'before_cpo_get_content', $product_id ); -
do_action( 'before_cpo_save_content', $content, $product_id ); -
do_action( 'before_cpo_update_content', $content, $product_id ); -
do_action( 'before_uni_cpo_init' ); -
do_action( "cpo_ajax_{sanitize_text_field($action)}" ); -
apply_filters( 'formatted_uni_cpo_price', number_format( $price, $data['decimals'], $data['decimal_separator'], $data['thousand_separator'] ), $price, $data['decimals'], $data['decimal_separator'], $data['thousand_separator'] ); -
apply_filters( 'plugin_locale', get_locale(), 'uni-cpo' ); -
apply_filters( 'uni_cpo_add_to_cart_validation_errors', $errors, $form_data, $product_id ); -
apply_filters( 'uni_cpo_add_to_cart_values_to_be_unset', array( 'cpo_cart_item_id', 'cpo_product_id', 'add-to-cart', 'cpo_data', 'cpo_nov', 'cpo_product_image', 'cpo_product_layered_image', 'quantity', ), $cart_item_data, $product_id ); -
apply_filters( 'uni_cpo_additional_item_data', array(), $item, $cart_item_key, $values ); -
do_action( 'uni_cpo_after_render_builder_modules', $product_data ); -
do_action( 'uni_cpo_after_render_content' ); -
do_action( 'uni_cpo_after_render_form_fields' ); -
apply_filters( 'uni_cpo_ajax_calculated_price', $price_calculated, $product, $filtered_form_data ); -
apply_filters( 'uni_cpo_ajax_calculation_price_tag_filter', uni_cpo_price( $price_display ), $price_display, $formatted_vars, $product_id ); -
apply_filters( 'uni_cpo_ajax_calculation_price_vars_filter', $price_vars, $formatted_vars, $product_id ); -
apply_filters( 'uni_cpo_before_render_builder_module', $row_data, $product_data ); -
do_action( 'uni_cpo_before_render_builder_modules', $product_data ); -
apply_filters( 'uni_cpo_before_render_builder_modules', $product_data ); -
apply_filters( 'uni_cpo_before_render_builder_option', $module_data, $post_data ); -
do_action( 'uni_cpo_before_render_content' ); -
do_action( 'uni_cpo_before_render_form_fields' ); -
apply_filters( 'uni_cpo_calculate_btn_text', '<i class="fas fa-calculator" aria-hidden="true"></i>' . esc_html__( 'Calculate', 'uni-cpo' ), $post->ID ); -
apply_filters( 'uni_cpo_cart_frontend_strings', array( 'cart_url' => apply_filters( 'woocommerce_add_to_cart_redirect', wc_get_cart_url(), null ), 'nonce' => wp_create_nonce( 'woocommerce-cart' ), 'items_settings_data' => $settings_data, ) ); -
apply_filters( 'uni_cpo_cart_i18n_frontend_strings', array( 'flatpickr' => $localizations['flatpickr'], 'saveChangesText' => __( 'Save changes', 'uni-cpo' ), 'duplicateText' => __( 'Duplicate', 'uni-cpo' ), 'editText' => __( 'Edit', 'uni-cpo' ), 'editInlineText' => __( 'Edit (inline)', 'uni-cpo' ), ) ); -
do_action( 'uni_cpo_cloud_storage_factory_init' ); -
apply_filters( 'uni_cpo_cpo_builder_capability', 'manage_woocommerce' ); -
do_action( "uni_cpo_delete_{$post_type}", $id ); -
apply_filters( 'uni_cpo_display_price_meta_tag', $starting_price, $product ); -
apply_filters( 'uni_cpo_enqueue_styles', array( 'uni-cpo-lity-css' => array( 'used_in' => array('frontend'), 'src' => self::get_asset_url( '/includes/vendors/lity/lity.min.css' ), 'deps' => '', 'version' => '2.3.1', 'media' => 'all', ), 'editablegrid' => array( 'used_in' => array('builder'), 'src' => self::get_asset_url( '/includes/vendors/editablegrid/editablegrid.css' ), 'deps' => '', 'version' => '2.0.1', 'media' => 'all', ), 'uni-... ); -
apply_filters( 'uni_cpo_enqueue_styles_conditional', array( 'ion-rangeSlider-skinFlat' => array( 'used_in' => array('range_slider_style', 'flat'), 'src' => self::get_asset_url( '/includes/vendors/range-slider/ion.rangeSlider.skinFlat.css' ), 'deps' => '', 'version' => '2.0.3', 'media' => 'all', ), 'ion-rangeSlider-skinModern' => array( 'used_in' => array('range_slider_style', 'modern'), 'src' => self::get_asset_url( '/includes/vendors/range-slide... ); -
apply_filters( 'uni_cpo_exclude_from_free_plugin_settings', array( 'ajax_add_to_cart', 'change_product_image_in_cart', 'product_image_size', 'product_thumbnails_container', 'display_weight_in_cart', 'display_dimensions_in_cart', 'range_slider_style', 'file_upload', 'multi_file_upload', 'sample_feature', 'gmap_api_key', 'csv_delimiter' ) ); -
apply_filters( 'uni_cpo_excluded_order_item_meta_keys', array( '_uni_custom_item_image', '_uni_item_weight', '_uni_item_width', '_uni_item_height', '_uni_item_length' ), $item ); -
apply_filters( 'uni_cpo_extra_data', array( 'order_product' => 'enabled', ), $product_data ); -
apply_filters( 'uni_cpo_filter_settings_data', $data_data, $original_data, $data_name ); -
apply_filters( 'uni_cpo_get_asset_url', plugins_url( $path, UNI_CPO_PLUGIN_FILE ), $path ); -
apply_filters( 'uni_cpo_get_cart_price_calculated_raw', $price_calc, $product_data ); -
apply_filters( 'uni_cpo_i18n_admin_strings', array( 'flatpickr' => $localizations['flatpickr'], 'no_file' => __( 'No file uploaded', 'uni-cpo' ), ) ); -
apply_filters( 'uni_cpo_i18n_builder_strings', array( 'panel' => array( 'smart_search' => __( 'Smart Search', 'uni-cpo' ), 'groups' => array( 'module' => __( 'Basic Modules', 'uni-cpo' ), 'option' => __( 'Options', 'uni-cpo' ), ), ), 'settings_groups' => array( 'general' => array( 'title' => __( 'General', 'uni-cpo' ), 'icon' => 'general', ), 'style' => array( 'title' => __( 'Style', 'uni-cpo' ), 'icon' => 'style', ), 'advanced' => array( '... ); -
apply_filters( 'uni_cpo_i18n_frontend_strings', array( 'calc_text' => __( 'Calculating', 'uni-cpo' ), 'max_file_size' => __( 'This file should not be larger than %s Kb', 'uni-cpo' ), 'mime_type' => __( 'File of this type is not allowed', 'uni-cpo' ), 'added_to_cart' => __( 'The product has been added successfully!', 'uni-cpo' ), 'flatpickr' => $localizations['flatpickr'], ) ); -
apply_filters( 'uni_cpo_in_cart_calculated_price', $price_calculated, $product, $filtered_form_data ); -
apply_filters( 'uni_cpo_in_cart_calculated_weight', $weight, $product, $filtered_form_data ); -
do_action( 'uni_cpo_init' ); -
apply_filters( 'uni_cpo_is_builder_active', $is_active, $product_data ); -
apply_filters( 'uni_cpo_max_file_size', $plugin_settings['max_file_size'], $product_data ); -
apply_filters( 'uni_cpo_mime_types', str_replace( ' ', '', $plugin_settings['mime_type'] ), $product_data ); -
apply_filters( 'uni_cpo_module_class', self::get_classname_from_module_type( $module_type ), $module_type, $module_id ); -
apply_filters( 'uni_cpo_module_type_query', false, $module_id ); -
apply_filters( 'uni_cpo_module_types', $module_types ); -
do_action( 'uni_cpo_new_module', $id ); -
apply_filters( 'uni_cpo_new_module_data', array( 'post_type' => 'uni_cpo_module', 'post_status' => 'publish', 'post_author' => get_current_user_id(), 'post_title' => $unique_slug, 'post_content' => '', ) ); -
do_action( 'uni_cpo_new_option', $id ); -
apply_filters( 'uni_cpo_new_option_data', array( 'post_type' => 'uni_cpo_option', 'post_status' => $option->get_status() ? $option->get_status() : 'publish', 'post_author' => get_current_user_id(), 'post_title' => $unique_slug, 'post_name' => $unique_slug, 'post_content' => '', 'comment_status' => 'closed' ) ); -
apply_filters( 'uni_cpo_nov_variable_value', uni_cpo_calculate_formula( $formula ), $product_data, $variables, $nov['slug'] ); -
apply_filters( 'uni_cpo_option_apply_changes_filter', array( 'cpo_suboptions' => array( 'data' ), 'cpo_validation' => array( 'logic' => array( 'cpo_vc_scheme' => [] ) ) ) ); -
apply_filters( 'uni_cpo_option_class', self::get_classname_from_option_type( $option_type ), $option_type, $option_id ); -
apply_filters( 'uni_cpo_option_classes', [] ); -
apply_filters( 'uni_cpo_option_classes_pro', [] ); -
do_action( 'uni_cpo_option_object_updated_props', $option, $this->updated_props ); -
apply_filters( 'uni_cpo_option_type_query', false, $option_id ); -
apply_filters( 'uni_cpo_option_types', $option_types ); -
apply_filters( 'uni_cpo_options_selector', '.js-uni-cpo-field', $product_data ); -
apply_filters( 'uni_cpo_options_selector_change', '.cart .input-text.qty, .js-uni-cpo-field:not(.js-uni-cpo-field-datepicker, .js-uni-cpo-field-range_slider, .js-uni-cpo-field-matrix)', $product_data ); -
apply_filters( 'uni_cpo_order_item_display_meta_key', $display_key, $v ); -
apply_filters( 'uni_cpo_order_item_display_meta_value', $display_value, $v ); -
apply_filters( 'uni_cpo_plugin_settings_fields', $settings ); -
apply_filters( 'uni_cpo_post_data_before_options', array(), $product_data['id'] ); -
apply_filters( 'uni_cpo_price', $formatted_price, $price, $args ); -
apply_filters( 'uni_cpo_price_raw', floatval( ( $negative ? $price * -1 : $price ) ) ); -
apply_filters( 'uni_cpo_price_regular_archive', wc_get_price_to_display( $product, array( 'price' => $raw_regular_price, ) ), $product ); -
apply_filters( 'uni_cpo_price_sale_archive', wc_get_price_to_display( $product, array( 'price' => $raw_sale_price, ) ), $product ); -
apply_filters( 'uni_cpo_price_starting_archive', $starting_price, $product ); -
apply_filters( 'uni_cpo_price_tax_rev_selector', [], $product_data ); -
apply_filters( 'uni_cpo_price_trim_zeros', false ); -
apply_filters( 'uni_cpo_product_post_data', $post_data, $product_data ); -
apply_filters( 'uni_cpo_raw_cart_item_data', $cart_item_data, $product_id ); -
do_action( 'uni_cpo_register_cloud_storage_providers', __CLASS__ ); -
apply_filters( 'uni_cpo_reset_form_btn_text', '' . esc_html__( 'Reset form', 'uni-cpo' ), $post->ID ); -
apply_filters( 'uni_cpo_scripts_localizations', array( 'parsleyjs' => array( 'defaultMessage' => __( "This value seems to be invalid.", 'uni-cpo' ), 'type_email' => __( "This value should be a valid email.", 'uni-cpo' ), 'type_url' => __( "This value should be a valid url.", 'uni-cpo' ), 'type_number' => __( "This value should be a valid number.", 'uni-cpo' ), 'type_digits' => __( "This value should be digits.", 'uni-cpo' ), 'type_alphanum' ... ); -
apply_filters( 'uni_cpo_setting_types', $setting_types ); -
apply_filters( 'uni_cpo_settings_classes', [] ); -
apply_filters( 'uni_cpo_settings_classes_pro', [] ); -
apply_filters( 'uni_cpo_taxonomy_args_option_type', array( 'hierarchical' => false, 'show_ui' => false, 'show_in_nav_menus' => false, 'query_var' => is_admin(), 'rewrite' => false, 'public' => false, ) ); -
apply_filters( 'uni_cpo_taxonomy_objects_option_type', array( 'uni_cpo_option' ) ); -
do_action( "uni_cpo_trash_{$post_type}", $id ); -
do_action( 'uni_cpo_update_product', $option->get_id() ); -
do_action( 'uni_cpo_updated' ); -
apply_filters( 'uni_cpo_variables_for_formula_logic', $variables ); -
do_action( 'unicpo_fs_loaded' ); -
apply_filters( 'wc_price_args', wp_parse_args( $args, $defaults ) ); -
apply_filters( 'woocommerce_add_to_cart_fragments', array( 'div.widget_shopping_cart_content' => '<div class="widget_shopping_cart_content">' . $mini_cart . '</div>', ) ); -
apply_filters( 'woocommerce_add_to_cart_hash', ( WC()->cart->get_cart_for_session() ? md5( json_encode( WC()->cart->get_cart_for_session() ) ) : '' ), WC()->cart->get_cart_for_session() ); -
apply_filters( 'woocommerce_add_to_cart_redirect', wc_get_cart_url(), null ); -
do_action( 'woocommerce_before_add_to_cart_button' ); -
apply_filters( 'yith_wcpb_add_cart_item_data_check', $add_cart_item_data_check, $cart_item_data, $product_id );
Generated from Product Options and Price Calculation Formulas for WooCommerce'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: