woocommerce_fulfillment_status_changed_order_note
Filters the order note message when a fulfillment status changes.
Return null to cancel the note.
Usage
add_filter( 'woocommerce_fulfillment_status_changed_order_note', 'wp_kama_woocommerce_fulfillment_status_changed_order_note_filter', 10, 5 );
/**
* Function for `woocommerce_fulfillment_status_changed_order_note` filter-hook.
*
* @param string|null $message The note message.
* @param Fulfillment $fulfillment The fulfillment object.
* @param \WC_Order $order The order object.
* @param string $old_status The previous status.
* @param string $new_status The new status.
*
* @return string|null
*/
function wp_kama_woocommerce_fulfillment_status_changed_order_note_filter( $message, $fulfillment, $order, $old_status, $new_status ){
// filter...
return $message;
}
- $message(string|null)
- The note message.
- $fulfillment(Fulfillment)
- The fulfillment object.
- $order(\WC_Order)
- The order object.
- $old_status(string)
- The previous status.
- $new_status(string)
- The new status.
Changelog
| Since 10.7.0 | Introduced. |
Where the hook is called
woocommerce_fulfillment_status_changed_order_note
woocommerce/src/Admin/Features/Fulfillments/FulfillmentOrderNotes.php 269
$message = apply_filters( 'woocommerce_fulfillment_status_changed_order_note', $message, $fulfillment, $order, $old_status, $new_status );