updated_(object_type)_meta
Fires immediately after updating metadata.
Usage
add_action( 'updated_(object_type)_meta', 'wp_kama_updated_object_type_meta_action', 10, 4 ); /** * Function for `updated_(object_type)_meta` action-hook. * * @param int $meta_id ID of updated metadata entry. * @param int $object_id Object ID. * @param string $meta_key Metadata key. * @param mixed $meta_value Metadata value. * * @return void */ function wp_kama_updated_object_type_meta_action( $meta_id, $object_id, $meta_key, $meta_value ){ // action... }
- $meta_id(int)
- ID of updated metadata entry.
- $object_id(int)
- Object ID.
- $meta_key(string)
- Metadata key.
- $meta_value(mixed)
- Metadata value.
Where the hook is called
woocommerce/includes/abstracts/abstract-wc-data.php 723
do_action( "updated_{$this->object_type}_meta", $meta->id, $this->get_id(), $meta->key, $meta->value );
Where the hook is used in WooCommerce
woocommerce/includes/class-wc-post-data.php 60
add_action( 'updated_post_meta', array( __CLASS__, 'flush_object_meta_cache' ), 10, 4 );
woocommerce/includes/class-wc-post-data.php 61
add_action( 'updated_order_item_meta', array( __CLASS__, 'flush_object_meta_cache' ), 10, 4 );
woocommerce/src/Admin/API/Reports/Customers/DataStore.php 103
add_action( 'updated_user_meta', array( __CLASS__, 'update_registered_customer_via_last_active' ), 10, 3 );