woocommerce_add_message

woocommerce_add_message

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_add_message') is found 2 times:

  • /includes/wc-notice-functions.php line 86
    	$notices = WC()->session->get( 'wc_notices', array() );
    
    	// Backward compatibility.
    	if ( 'success' === $notice_type ) {
    		$message = apply_filters( 'woocommerce_add_message', $message );
    	}
    
    	$message = apply_filters( 'woocommerce_add_' . $notice_type, $message );
    
    	if ( ! empty( $message ) ) {
    		$notices[ $notice_type ][] = array(
    
  • /includes/wc-notice-functions.php line 196
     * @param bool   $return      true to return rather than echo. @since 7.7.0.
     */
    function wc_print_notice( $message, $notice_type = 'success', $data = array(), $return = false ) {
    	if ( 'success' === $notice_type ) {
    		$message = apply_filters( 'woocommerce_add_message', $message );
    	}
    
    	$message = apply_filters( 'woocommerce_add_' . $notice_type, $message );
    
    	// Buffer output.
    	ob_start();