woocommerce_add_message

woocommerce_add_message

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

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_add_message') is found 2 times:

  • /includes/wc-notice-functions.php line 86
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    $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
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    * @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();