woocommerce_order_updated_messages
This is used by the order edit page to show messages in the notice fields. It should be similar to post_updated_messages filter, i.e.: array( {order_type} => array(
1 => 'Order updated.', 2 => 'Custom field updated.',
... ).
The index to be displayed is computed from the $_GET['message'] variable.
Usage
add_filter( 'woocommerce_order_updated_messages', 'wp_kama_woocommerce_order_updated_messages_filter' ); /** * Function for `woocommerce_order_updated_messages` filter-hook. * * @param $array * * @return */ function wp_kama_woocommerce_order_updated_messages_filter( $array ){ // filter... return $array; }
- $array
- -
Changelog
Since 7.4.0. | Introduced. |
Where the hook is called
woocommerce_order_updated_messages
woocommerce/src/Internal/Admin/Orders/Edit.php 393
$messages = apply_filters( 'woocommerce_order_updated_messages', array() );
Where the hook is used in WooCommerce
woocommerce/includes/admin/class-wc-admin-post-types.php 44
add_filter( 'woocommerce_order_updated_messages', array( $this, 'order_updated_messages' ) );