CartNudge 1.1.0 has 1 actions and 14 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 CartNudge fires an action
add_action( 'cartnudge_fs_loaded', function() {
// Your code runs here.
}, 10, 1 );
// Change a value CartNudge is about to use
add_filter( 'cartnudge_admin_build', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );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 the admin bundle folder. */ apply_filters( 'cartnudge_admin_build', 'admin/build/' ); -
/** * Filters the capability needed to manage CartNudge. */ apply_filters( 'cartnudge_capability', 'manage_woocommerce' ); -
/** * Filters the highest number of offers the widget may be set to show. */ apply_filters( 'cartnudge_max_offers_ceiling', self::MAX_OFFERS ); -
/** * Filters the offer candidates that take priority over the global offers. */ apply_filters( 'cartnudge_offer_candidates', [] ); -
/** * Filters the configuration that decides the offer pool. */ apply_filters( 'cartnudge_offer_config_signature', [ 'offers' => get_option( CartNudge_Offers::OPTION_KEY, [] ), 'max' => CartNudge_Settings::get_max_offers(), ] ); -
/** * Filters the discount for a product ahead of the global offers. */ apply_filters( 'cartnudge_offer_discount', null, $product_id ); -
/** * Filters whether a discount granted by a source other than a global offer * still applies to a cart line. */ apply_filters( 'cartnudge_offer_discount_live', false, $source, $cart_item_key, $cart ); -
/** * Filters extra attributes for an offer card's list item. */ apply_filters( 'cartnudge_offer_item_attributes', [], [ 'product' => $product, 'priced' => $priced_product instanceof WC_Product ? $priced_product : $product, 'variation_id' => $item_variation_id, 'price' => $discounted_price, 'variations' => array_map( fn( $v ) => $v['discounted'], $variations_data ), ] ); -
/** * Filters the order the offer candidates are shown in. */ apply_filters( 'cartnudge_ordered_offer_candidates', $candidates ); -
/** * Filters the sanitized settings before they are saved. */ apply_filters( 'cartnudge_sanitize_settings', $sanitized, $request, $current ); -
do_action( 'cartnudge_fs_loaded' ); -
apply_filters( 'cartnudge_offers_title', CartNudge_Options::get( 'heading_text', __( 'You might also like', 'cartnudge' ) ) ); -
apply_filters( 'woocommerce_add_to_cart_fragments', [] ); -
apply_filters( 'woocommerce_empty_price_html', '', $product ); -
apply_filters( 'woocommerce_get_price_html', $html, $product );
Generated from CartNudge'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: