Opened 3 years ago
Closed 2 years ago
#15465 closed defect (bug) (fixed)
add_meta() can return the wrong meta_id
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1 |
| Component: | Administration | Version: | 3.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | cyberhobo@… |
Description
I think this is a simple global variable bug.
Currently $wpdb->insert_id is being returned after do_action() is called, which can change that value if the action makes use of the global $wpdb.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.

(In [16659]) Save meta id before performing actions since the insert_id can change. Props cyberhobo. fixes #15465