You are getting old version of the term, because edit_{$taxonomy} action is fired after the term is updated but before term’s cache is cleared. Use edited_{$taxonomy} hook, which fires your action after the term is updated and its cache is cleared.
Related Posts:
- Difference Between Filter and Action Hooks?
- How many times will this code run? (or, how rich is grandma?)
- Which hook should be used to add an action containing a redirect?
- add_action hook for completely new post?
- WordPress Hook for user register
- Using filters and actions for plugin API?
- Is there widely accepted phpDoc syntax for documenting which hook calls a function?
- Explanation of the “posts_join” and “posts_fields” filter hooks?
- What’s the earliest point I can get the queried object ID?
- How do I Make a Theme “plugin-ready”?
- WordPress scheduled task is called but not executed
- How to modify post content before writing to database?
- What’s the difference between hooks, filters and actions? [duplicate]
- How to use filter hook ‘post_updated_messages’ in coherence with action hook ‘save_post’
- How to check if certain plugin exists and in expected version
- Plugin development, hooks, generate content
- Is it possible to create an action hook using do_action() within add_action()?
- Hook event for upload image in the menu
- Help with callback using do_action_ref_array
- Order of Operation for these three hooks
- Best Practices for Creating and Handling Forms with Plugins?
- Is there a better way to implement responsive images than what WordPress uses by default?
- Modifying values with add_action to be sent to db
- Woocommerce – Hide a Column in Cart Table
- save_post hook not triggered in WP v3.6.1
- Hook to get image filename when it is uploaded
- How to display a message about updates in the plugin list
- How to delete an user including data from custom database tables
- Should action callbacks start with a verb?
- Execute Hook on the footer or header after activating a plugin
- Why is my javascript not invoked in my hooks except wp_head?
- Namespaced action and filter tags
- What filter should I use to insert a button inside on Media>Add New
- get_current_screen() return null
- How to use a hook to override an update_post_meta call in a plugin?
- External Authentication, session_tokens not destroyed on logout
- Conditional hook based on the core function that is calling it
- correct way to call javascript into hook function
- Prefixing plugin hooks (actions/filters) with a wrapper class or functions
- Send push when new post is published in a certain category
- WordPress custom taxonomy check box to dropdown
- Force HTTPS 301 redirect with hook
- Add a new confirmation page before saving
- use of do_action() without any functions attached
- How dynamic action login_form_{action} is working
- What happens when two or more plugins use the same hook?
- How to get all queries’s results after they have executed?
- flush rewrite rules after plugin update?
- Add child pages to submenu automatically
- After plugin activation hook
- Odd map_meta_cap $args on post edit — sometimes integer, sometimes string
- How can I create a custom plugin that allows anonymous users to signup without registering?
- hook filter after the_content on a specific page
- Bind a function with its own argument to show something dynamically after every content
- What’s the hook for filtering every texts of site?
- Hook add_attachment error
- Associate multiple email addresses with the same user account, so they can log in with either
- Run command “composer install” when activating wordpress plugin
- Update variable value via add_filter
- Custom filter not working
- hook update_option/updated_option empty $old_value and $value
- Configure WordPress to Generate Scheme-less Relative URLs
- How to find list of all functions bind to a particular hook from my plugin?
- Ajax +wordpress onClick link redirect to new page and create html content
- How to replace settings in WordPress plugin from a theme
- Creating posts with links from a txt file
- Action / Hook when a new plugin is added
- apply_filters() and call_user_func() to define and call a function outside a class
- Getting Post ID at “stylesheet” and “template” hooks
- Is there any way to get post meta from publish_post hook?
- Problem in plugin debuging in wordpress
- WordPress Plugin Boilerplate – add actions and/or filters based on user’s role
- OOP development and hooks
- Plugin Development – Call to undefined function comment_exists()
- Add_action not calling callback function
- Prevent plugin activation and add admin notice
- how to retrieve post_id under woocommerce_add_to_cart_validation hook?
- add_option_{$option} action hook not being called
- Function not working on any file other than the main plugin file
- Does WordPress have something like timer hook?
- Multi hook deploiement
- Can I use a hook other than ‘init’ to handle form submissions?
- Template file structure , wordpress hook for altering the template
- woocommerce single product page hook not working
- How can I set a dynamic value for post_updated_messages based on return value of post_updated?
- What is the use of wp_schedule_event hook?
- How do I replace title with my plugin?
- Looking for Hook that is fired after a plugin or wp upgrade is installed/updated
- Woocommerce: block user removing cart item
- Insert plugin html content to a specific spot in the frontpage
- How can I get a plugin to hook ‘dbdelta_queries’ — a filter used during version update?
- Send retrieve password notification email with custom HTML email template
- get_term_by() returning null on plugin
- Ninja Forms: Front-End Forms, Post ID?
- Execute callback after REST API request completes + Response is sent
- How to customize password reset message page on success if no error in password reset
- Is there a hook for updated image metadata upon using image editor?
- How to run this plugin every time a post is saved?
- how to execute a function only when i send an order to trash [closed]
- Are woocommerce_thankyou hook and is_order_received_page() redundant? [closed]