woocommerce_add_(notice_type)
Usage
add_filter( 'woocommerce_add_(notice_type)', 'wp_kama_woocommerce_add_notice_type_filter' );
/**
* Function for `woocommerce_add_(notice_type)` filter-hook.
*
* @param $message
*
* @return
*/
function wp_kama_woocommerce_add_notice_type_filter( $message ){
// filter...
return $message;
}
- $message
- -
Where the hook is called
woocommerce_add_(notice_type)
woocommerce_add_(notice_type)
woocommerce/includes/wc-notice-functions.php 96
$message = apply_filters( 'woocommerce_add_' . $notice_type, $message );
woocommerce/includes/wc-notice-functions.php 206
$message = apply_filters( 'woocommerce_add_' . $notice_type, $message );
Where the hook is used in WooCommerce
woocommerce/includes/class-wc-cart-session.php 80
add_action( 'woocommerce_add_to_cart', array( $this, 'persistent_cart_update' ) );
woocommerce/includes/class-wc-cart-session.php 86
add_action( 'woocommerce_add_to_cart', array( $this, 'maybe_set_cart_cookies' ) );
woocommerce/includes/class-wc-cart.php 130
add_action( 'woocommerce_add_to_cart', array( $this, 'calculate_totals' ), 20, 0 );
woocommerce/includes/class-wc-form-handler.php 950
remove_action( 'woocommerce_add_to_cart', array( WC()->cart, 'calculate_totals' ), 20, 0 );
woocommerce/includes/class-wc-form-handler.php 957
add_action( 'woocommerce_add_to_cart', array( WC()->cart, 'calculate_totals' ), 20, 0 );
woocommerce/includes/class-wc-shortcodes.php 574
add_filter( 'woocommerce_add_to_cart_form_action', '__return_empty_string' );
woocommerce/includes/class-wc-shortcodes.php 657
remove_filter( 'woocommerce_add_to_cart_form_action', '__return_empty_string' );
woocommerce/includes/wc-cart-functions.php 33
add_filter( 'woocommerce_add_to_cart_validation', 'wc_protected_product_add_to_cart', 10, 2 );
woocommerce/src/Blocks/BlockTypes/AddToCartForm.php 191
add_filter( 'woocommerce_add_to_cart_form_action', array( $this, 'add_to_cart_form_action' ), 10 );
woocommerce/src/Blocks/BlockTypes/AddToCartForm.php 216
remove_filter( 'woocommerce_add_to_cart_form_action', array( $this, 'add_to_cart_form_action' ), 10 );