[wp-trac] [WordPress Trac] #48300: metadata registered using register_meta() do not persist through several tests

WordPress Trac noreply at wordpress.org
Fri Mar 24 18:59:13 UTC 2023


#48300: metadata registered using register_meta() do not persist through several
tests
------------------------------+------------------------------
 Reporter:  leogermani        |       Owner:  (none)
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Build/Test Tools  |     Version:  5.1.1
 Severity:  normal            |  Resolution:
 Keywords:                    |     Focuses:  rest-api
------------------------------+------------------------------
Changes (by leogermani):

 * version:  5.1 => 5.1.1


Comment:

 > To refire the init hooks you can include do_action( 'init' ) in your set
 up functions. You can see an example of this in
 tests/phpunit/tests/customize/selective-refresh-ajax.php's
 do_customize_boot_actions() method.

 One thing that doesn't make sense and reinforces that this is a bug for me
 is the fact that both my custom taxonomy and the custom term_meta are
 registered in the same init callback.

 On my tests, the taxonomy persists, but the custom meta don't.

 (Just wanted to say that I've just spent a couple of hours because of this
 bug, again, until I found what was happened and remembered I had stumbled
 on it before...)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48300#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list