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.
Использование
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
- -
Список изменений
С версии 7.4.0. | Введена. |
Где вызывается хук
woocommerce_order_updated_messages
woocommerce/src/Internal/Admin/Orders/Edit.php 398
$messages = apply_filters( 'woocommerce_order_updated_messages', array() );
Где используется хук в WooCommerce
woocommerce/includes/admin/class-wc-admin-post-types.php 44
add_filter( 'woocommerce_order_updated_messages', array( $this, 'order_updated_messages' ) );