Side Cart & Upsell for WooCommerce 1.13.1 has 17 actions and 57 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 Side Cart & Upsell for WooCommerce fires an action
add_action( 'asnp_weuc_upsell_cross_sell_deleted', function( $id, $request ) {
// Your code runs here.
}, 10, 2 );
// Change a value Side Cart & Upsell for WooCommerce is about to use
add_filter( 'asnp_weuc_cart_product_cannot_add_another_message', function( $message, $product ) {
// Change $message here.
return $message;
}, 10, 2 );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 message about more than 1 product being added to cart. */ apply_filters( 'asnp_weuc_cart_product_cannot_add_another_message', $message, $product ); -
asnp_weuc_cart_product_not_enough_stock_already_in_cart_message
filter Copy link Customise this hook/** * Filters message about product not having enough stock accounting for what's * already in the cart. */ apply_filters( 'asnp_weuc_cart_product_not_enough_stock_already_in_cart_message', $message, $product, $stock_quantity, $stock_quantity_in_cart ); -
/** * Filters message about product not having enough stock. */ apply_filters( 'asnp_weuc_cart_product_not_enough_stock_message', $message, $product, $stock_quantity ); -
woocommerce_cart_product_cannot_be_purchased_message
filter Used by 3 plugins → Copy link Customise this hook/** * Filters message about product unable to be purchased. */ apply_filters( 'woocommerce_cart_product_cannot_be_purchased_message', $message, $product_data ); -
/** * Which upsells a visitor is eligible for depends on their cart, their role * and their purchase history - so this list is visitor-specific in exactly the * way the preloaded cart is, and must not be written into HTML a full-page * cache will replay to somebody else. On a store with a 10 hour TTL and * "Exclude if in cart", one shopper's cart would otherwise shape the offers * every later visitor sees for ... */ apply_filters( 'asnp_weuc_enable_side_cart_upsell_preload', function_exists( 'WC' ) && WC()->session && WC()->session->has_session() ); -
/** * Filter the list of known WooCommerce tables. */ apply_filters( 'asnp_weuc_install_get_tables', $tables ); -
/** * How many rows one search may produce once variations are included. */ apply_filters( 'asnp_weuc_items_search_expanded_limit', 100 ); -
apply_filters( 'asnp_weuc_get_product_types_for_upsell', array_diff( $defaults, $excludes ), $excludes ); -
apply_filters( 'asnp_weuc_prepare_variable_prices', [ 'display_price' => $product->get_price_html() ], $product, $item ); -
apply_filters( 'asnp_weuc_offer_cart_item_data', $cart_data, $product, $args ); -
apply_filters( 'asnp_weuc_offer_cart_item_price', Upsell\get_upsell_item_price( $product, [ 'discount_type' => ! empty( $product_data['discount_type'] ) ? $product_data['discount_type'] : '', 'discount' => isset( $product_data['discount'] ) && '' !== $product_data['discount'] ? (float) $product_data['discount'] : null, 'exchange_price' => false, ] ), $product, $product_data ); -
apply_filters( 'asnp_weuc_add_to_cart_sold_individually_quantity', 1, $quantity, $product ); -
do_action( "asnp_weuc_before_{__FUNCTION__}" ); -
apply_filters( 'asnp_weuc_custom_styles', $custom_styles, $styles ); -
apply_filters( 'asnp_weuc_get_variation_attribute_options', $options_cache[ $cache_key ], $args ); -
apply_filters( "asnp_weuc_items_api_{__FUNCTION__}", $items, $search, $request ); -
do_action( 'asnp_weuc_upsell_cross_sell_deleted', $id, $request ); -
do_action( 'litespeed_purge_esi', 'storefront-cart-header' ); -
apply_filters( 'woocommerce_variation_option_name', $term->name, $term, $taxonomy, $product ); -
apply_filters( 'asnp_easy_product_upsells_get_setting', $value, $key, $default ); -
apply_filters( "asnp_easy_product_upsells_get_setting_{$key}", $value, $key, $default ); -
apply_filters( 'asnp_easy_product_upsells_get_settings', $this->plugin_settings ); -
apply_filters( "asnp_weuc_{__FUNCTION__}", $item ); -
apply_filters( "asnp_weuc_{__FUNCTION__}_item", $data, $item ); -
apply_filters( 'asnp_weuc_admin_localize_script', [ 'pro_active' => Upsell\is_pro_active(), 'pro_version' => defined( 'ASNP_WEUC_PRO_VERSION' ) ? ASNP_WEUC_PRO_VERSION : '', 'plugin_url' => ASNP_WEUC_PLUGIN_URL, 'price_format' => get_woocommerce_price_format(), 'number_of_decimals' => wc_get_price_decimals(), 'thousand_separator' => wc_get_price_thousand_separator(), 'decimal_separator' => wc_get_price_decimal_separator(), 'roles' => ItemsMode... ); -
do_action( 'asnp_weuc_before_admin_load_scripts' ); -
apply_filters( 'asnp_weuc_before_order_item_meta', $content, $order_item_id, $order_item ); -
asnp_weuc_condition_validator_is_valid_{$condition['condition']}
filter Copy link Customise this hookapply_filters( "asnp_weuc_condition_validator_is_valid_{$condition['condition']}", $is_valid, $condition ); -
apply_filters( 'asnp_weuc_discount_calculator_calculate', $value, $price, $discount, $discount_type ); -
apply_filters( 'asnp_weuc_enable_side_cart_hydration', true ); -
apply_filters( 'asnp_weuc_enable_upsell_preload', true, $type ); -
apply_filters( 'asnp_weuc_exact_item_id', absint( $id ), $type ); -
apply_filters( 'asnp_weuc_get_categories_args', $args ); -
apply_filters( 'asnp_weuc_get_product_image_src', $src, $product, $size, $placeholder ); -
apply_filters( 'asnp_weuc_get_products_query', $wp_query_args, $args ); -
apply_filters( 'asnp_weuc_get_tags_args', $args ); -
apply_filters( 'asnp_weuc_get_variation_attribute_options_args', $args ); -
do_action( 'asnp_weuc_installed' ); -
apply_filters( 'asnp_weuc_is_valid_cart_upsell', true, $upsell ); -
apply_filters( 'asnp_weuc_is_valid_product_upsell', true, $upsell, $product ); -
apply_filters( 'asnp_weuc_maybe_change_price', $price, $product, $price_type ); -
apply_filters( 'asnp_weuc_maybe_exchange_price', $price, $type ); -
do_action( "asnp_weuc_post_insert_{$type}", $wpdb->insert_id, $data ); -
do_action( "asnp_weuc_pre_insert_{$type}", $data ); -
apply_filters( 'asnp_weuc_preload_upsell_without_session', false, $type ); -
apply_filters( 'asnp_weuc_prepare_product_data', $data, $product, $item, $extra_data ); -
apply_filters( 'asnp_weuc_prepare_product_prices', [ 'regular_price' => $regular_price, 'sale_price' => $sale_price, 'display_price' => $display_price, ], $product, $item ); -
apply_filters( 'asnp_weuc_product_validator_cache_key_data', $data, $item, $product ); -
apply_filters( 'asnp_weuc_product_validator_cache_ttl', DAY_IN_SECONDS, $product ); -
apply_filters( "asnp_weuc_product_validator_is_valid_{$item['type']}", $is_valid, $item, $product ); -
apply_filters( 'asnp_weuc_settings_save', $data, $request ); -
do_action( 'asnp_weuc_settings_saved', $data, $request ); -
apply_filters( 'asnp_weuc_should_add_addons_to_cart', true, $cart_item_data, $cart_item_key, $product_id, $quantity, $variation_id, $variation ); -
apply_filters( 'asnp_weuc_side_cart_get_setting', $value, $key, $default ); -
apply_filters( "asnp_weuc_side_cart_get_setting_{$key}", $value, $key, $default ); -
apply_filters( 'asnp_weuc_side_cart_save', $data, $request ); -
do_action( 'asnp_weuc_side_cart_saved', $data, $request ); -
apply_filters( 'asnp_weuc_side_cart_script', $this->get_url( 'side-cart/index', 'js' ) ); -
apply_filters( 'asnp_weuc_side_cart_style', $this->get_url( 'side-cart/style', 'css' ) ); -
do_action( 'asnp_weuc_updated' ); -
do_action( 'asnp_weuc_upsell_cross_sell_created', $item, $request ); -
do_action( 'asnp_weuc_upsell_cross_sell_duplicated', $item_id, $id, $request ); -
do_action( 'asnp_weuc_upsell_cross_sell_saved', $item, $request ); -
do_action( 'asnp_weuc_upsell_cross_sell_status_updated', $ids, $status ); -
do_action( 'asnp_weuc_upsell_cross_sell_updated', $item, $request ); -
apply_filters( 'asnp_weuc_upsell_item_not_allowed_product_types', [ 'variable', 'bundle', 'group', 'composite', 'booking', ] ); -
apply_filters( 'asnp_weuc_validate_side_cart_upsell_item_data', true, $item, (object) [ 'options' => $options, 'context' => $context ] ); -
apply_filters( 'asnp_weuc_validate_upsell_item_data', true, $upsell_item_data, $item ); -
do_action( 'litespeed_purge_private_all' ); -
do_action( 'litespeed_vary_ajax_force' ); -
apply_filters( 'woocommerce_add_to_cart_fragments', [ 'div.widget_shopping_cart_content' => '<div class="widget_shopping_cart_content">' . $mini_cart . '</div>' ] ); -
woocommerce_cart_display_prices_including_tax
filter Used by 3 plugins → Copy link Customise this hookapply_filters( 'woocommerce_cart_display_prices_including_tax', 'incl' === WC()->cart->get_tax_price_display_mode() ); -
apply_filters( 'wpml_object_id', $id, $type, true );
Generated from Side Cart & Upsell 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: