woocommerce_fulfillment_order_status_changed_order_note filter-hookWC 10.7.0

Filters the order note message when the order fulfillment status changes.

Return null to cancel the note.

Usage

add_filter( 'woocommerce_fulfillment_order_status_changed_order_note', 'wp_kama_woocommerce_fulfillment_order_status_changed_note_filter', 10, 4 );

/**
 * Function for `woocommerce_fulfillment_order_status_changed_order_note` filter-hook.
 * 
 * @param string|null $message    The note message.
 * @param \WC_Order   $order      The order object.
 * @param string      $old_status The previous fulfillment status.
 * @param string      $new_status The new fulfillment status.
 *
 * @return string|null
 */
function wp_kama_woocommerce_fulfillment_order_status_changed_note_filter( $message, $order, $old_status, $new_status ){

	// filter...
	return $message;
}
$message(string|null)
The note message.
$order(\WC_Order)
The order object.
$old_status(string)
The previous fulfillment status.
$new_status(string)
The new fulfillment status.

Changelog

Since 10.7.0 Introduced.

Where the hook is called

FulfillmentOrderNotes::add_order_fulfillment_status_changed_note()
woocommerce_fulfillment_order_status_changed_order_note
woocommerce/src/Admin/Features/Fulfillments/FulfillmentOrderNotes.php 226
$message = apply_filters( 'woocommerce_fulfillment_order_status_changed_order_note', $message, $order, $old_status, $new_status );

Where the hook is used in WooCommerce

Usage not found.