Support » Developing with WordPress » deleted_$taxonomy not getting fired

  • Want to call a function after my custom taxonomy was deleted. But the hook is not getting fired.

    The hook is listed in WP hook reference page.

    deleted_$taxonomy

    Runs after a term in a specific taxonomy is deleted, and after the term cache has been cleaned.

    Is this a known issue.? Does anyone have a solution/example.?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The hook isn’t deleted_$taxonomy, it’s deleted_ and then whatever the taxonomy is, deleted_category, for example. See the documentation for the hook here. Is that how you have hooked your function?

    • This reply was modified 1 year, 10 months ago by Jacob Peattie.

    Hi @jakept,

    Below is the code

    add_action('deleted_college-session', 'update_deleted_session_relations');
    
    function update_deleted_session_relations($tt_id){
        
        // Do the action here
        
    }

    Also please see the SO post regarding this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘deleted_$taxonomy not getting fired’ is closed to new replies.