Hide Price and Add to Cart for WooCommerce 1.0.5 has 1 actions and 13 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 Hide Price and Add to Cart for WooCommerce fires an action
add_action( 'wmhp_after_single_add_to_cart_replacement', function( $rule_id, $atc_options, $product ) {
// Your code runs here.
}, 10, 3 );
// Change a value Hide Price and Add to Cart for WooCommerce is about to use
add_filter( 'b2bmanagers_custom_button_atts', function( $atts, $rule_id ) {
// Change $atts here.
return $atts;
}, 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
-
/** * Filter the class and style attributes of the custom link button. */ apply_filters( 'b2bmanagers_custom_button_atts', $atts, $rule_id ); -
/** * Filter the text (or button label) that replaces the Add to Cart button. */ apply_filters( 'b2bmanagers_replace_add_to_cart_text', $replace_text, $rule_id, $product ); -
/** * Filter the text that replaces a hidden price. */ apply_filters( 'b2bmanagers_replace_price_text', $replace_text, $rule_id, $product ); -
/** * Fires after the add-to-cart replacement for a rule has been printed (or when * the rule uses an option this plugin does not render itself). */ do_action( 'wmhp_after_single_add_to_cart_replacement', $rule_id, $atc_options, $product ); -
/** * Filter the IDs of rules that hide the Add to Cart button. Runs on every call * so add-ons can narrow the list for the current visitor. */ apply_filters( 'wmhp_hide_price_get_atc_rules', $this->get_flagged_rules( 'atc_rules', 'wmhp_hide_atc' ) ); -
/** * Filter the IDs of rules that hide the price. Runs on every call so add-ons * can narrow the list for the current visitor. */ apply_filters( 'wmhp_hide_price_get_price_rules', $this->get_flagged_rules( 'price_rules', 'wmhp_hide_price' ) ); -
/** * Filter the IDs of all published rules. */ apply_filters( 'wmhp_hide_price_get_rules', $data ); -
/** * Filter the arguments used to register the Hide Price Rule post type. */ apply_filters( 'wmhp_hide_price_register_post_type', array( 'labels' => array( 'name' => __( 'Hide Price Rules', 'hide-price-and-add-to-cart-for-woocommerce' ), 'singular_name' => __( 'Hide Price Rule', 'hide-price-and-add-to-cart-for-woocommerce' ), 'all_items' => __( 'Hide Price Rules', 'hide-price-and-add-to-cart-for-woocommerce' ), 'menu_name' => _x( 'Hide Price Rules', 'Admin menu name', 'hide-price-and-add-to-cart-for-woocommerce' ), 'add_n... ); -
/** * Filter the plugin folder holding the default templates. */ apply_filters( 'wmhp_price_get_default_template_path', WMHP_PLUGIN_PATH . 'templates/' ); -
/** * Filter the theme folder (relative to the theme root) searched for template * overrides. */ apply_filters( 'wmhp_price_get_template_path', 'woocommerce/wm-hide-price/' ); -
/** * Filter whether hide-price rules run for the current request. */ apply_filters( 'wmhp_should_apply_rules', $apply ); -
/** * Legacy name of the filter below, kept so existing customisations keep * working. */ apply_filters( 'woomanagers_custom_button_atts', $atts, $rule_id ); -
/** * Legacy name of the filter below, kept so existing customisations keep * working. */ apply_filters( 'woomanagers_replace_add_to_cart_text', $replace_text, $rule_id, $product ); -
/** * Legacy name of the filter below, kept so existing customisations keep * working. */ apply_filters( 'woomanagers_replace_price_text', $replace_text, $rule_id, $product );
Generated from Hide Price and Add to Cart 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: