[wp-trac] [WordPress Trac] #59215: Bug in wp_set_post_categories function

WordPress Trac noreply at wordpress.org
Sun Aug 27 08:18:38 UTC 2023


#59215: Bug in wp_set_post_categories function
--------------------------+------------------------------
 Reporter:  faaiq         |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Taxonomy      |     Version:  6.3
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------
Changes (by sabernhardt):

 * keywords:  changes-requested =>
 * component:  General => Taxonomy


Old description:

> wp_set_post_terms( $post_id, $post_categories, 'category', $append );
> category is being passed staticky . so wp_set_post_categories is not
> working to map custom category with customer post type. it is not making
> any entry for custom post type in  the table wp_term_relationships.

New description:

 `wp_set_post_terms( $post_id, $post_categories, 'category', $append );`
 category is being passed staticky. so `wp_set_post_categories` is not
 working to map custom category with custom post type. it is not making any
 entry for custom post type in the table `wp_term_relationships`.

--

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


More information about the wp-trac mailing list