graphql_post_object_mutations_allow_term_creation

Filter whether to allow terms to be created during a post mutation.

If a post mutation includes term input for a term that does not already exist, this will allow terms to be created in order to connect the term to the post object, but if filtered to false, this will prevent the term that doesn’t already exist from being created during the mutation of the post.

apply_filters( 'graphql_post_object_mutations_allow_term_creation', bool $allow_term_creation, WP_Taxonomy $tax_object );

Params

  • $allow_term_creation (bool): Whether new terms should be created during the post object mutation
  • $tax_object (WP_Taxonomy): The Taxonomy object for the term being added to the Post Object