WordPress.org

Make WordPress Core

Opened 11 months ago

Closed 11 months ago

Last modified 11 months ago

#40371 closed defect (bug) (worksforme)

Issue in action update*_{$meta_type}_meta

Reported by: SGr33n Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7.3
Component: Users Keywords:
Focuses: administration Cc:

Description

Hi,

I'm just working on a plugin that make use of updated_{$meta_type}_meta action (updated_user_meta in my case), but looks like this action doesn't completely work.

Taking a look at the code here https://core.trac.wordpress.org/browser/tags/4.7.3/src/wp-includes/meta.php#L267 I see in the related code that there is a foreach loop through meta_ids, but the called action also defines a $meta_key and a $_meta_value that are not looping, so they would always have the same value, even if the meta key is changing. This would happen if, e.g., that action is called after the user updated a few profile fields from the WordPress backend. Is this a bug?

Thanks.

Change History (2)

#1 @SGr33n
11 months ago

  • Resolution set to worksforme
  • Status changed from new to closed

Tested more in deep, my fault.
Works good.

#2 @swissspidy
11 months ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.