If I understand correctly, you want to do this:
add_action('upgrader_process_complete', 'my_clear_elementor_cache');
function my_clear_elementor_cache()
{
// Make sure that Elementor loaded and the hook fired
if (did_action('elementor/loaded')) {
// Automatically purge and regenerate the Elementor CSS cache
\Elementor\Plugin::instance()->files_manager->clear_cache();
}
}
Related Posts:
- Is there a WordPress core & plugins update action hook?
- Hook into WordPress update?
- How to update WordPress core or themes and still have my child theme hooks work
- upgrader_process_complete filter not fired using ajax updates
- How to hook update_post_meta and delete_post_meta?
- Are there any hooks that alter the 404 logic?
- WooCommerce: change display order of product short description and price [closed]
- Add_action to wp_head via functions.php
- trigger save_post event programmatically
- Implementing advanced add_* function wrappers
- My add_action (wp_footer, ‘method’) is not calling?
- Hook into wp_head(); in a plugin
- is it possible to get the hook name in add_action?
- What hook is executed just after wp_query has been executed?
- How can I hook into the post editor title field in order to change the HTML?
- How to properly test a method that is called by an action hook
- How can I do customizations on login, registration and password recovery forms?
- WordPress v5.0.3 Gutenberg & JS error “Uncaught SyntaxError: missing ) after argument list”
- Can’t get ID of post that relates to the comment
- Custom form action hook
- How to send an automated user ‘inactivity’ email?
- wp_redirect() not working on form submission with init hook
- How do I successfully create a hook for an email override?
- Cast string to number
- How to debug user_register hook
- Storing state between hook functions
- Using wp_editor tinyMCE in metabox cause form alert on leaving page
- What’s the difference between “wp” and “wp_loaded”?
- WordPress capabilities and restricted categories access
- Query categories that have a description
- How to use custom form on add_meta_boxes callback
- Is it possible to switch Gutenberg’s editor styles when document settings change?
- schedule event in class oriented plugin
- How can I find the hook I need to rewrite a function?
- Show message in media-new.php
- Hooks are not being removed in child theme
- Can I hook into wp_update_core outside of the admin?
- add_action second argument missing
- How to get user meta fields that have just been updated?
- admin_notices action doesn’t trigger within save_post action
- When a plugin gets updated from the repo, does the “activation” hook fire again?
- I don’t understand how add_action and do_action work in tandem. The former executes the code already…what is do_action for?
- Insert HTML in post, below nav bar but above content?
- Convert Gravity Form Entry Date on Export
- Fatal error: Call to a member function get_queried_object_id()
- Defining hooks within (php)classes?
- Divi hook not working [closed]
- Add WordPress hook outside of Plugin or Theme
- How to add content to suscriptor dashboard frontend?
- How to perform action when plugin/theme editor is used?
- Add PHP code to header section from plugin
- How to run hooks one by one manually?
- What is the proper hook to use for recording a post view?
- How to load this code on function.php
- What hook should I use that will fire whenever I open a post for editing in the WP back-end?
- Woocommerce single_product_summary hook not working
- Where is publish_post hook fired?
- A good hook to check authorization and redirect?
- Is there a author_update action?
- Bloginfo hook – can it be more precise?
- Custom posts and get_post_meta in {$post_status}_{$post_type}
- Hooking custom PHP output into WP: how to do it, parse_request almost works but not quite
- Print on screen during shutdown hook – error during saving in theme-editor.php
- How to stop execution of a function via add_action hook?
- changing genesis_before_while in new theme framework
- Moving Javascript from footer to header
- Adding a new hidden field based on a condition in Ninja Forms
- Forcing WooCommerce customers to create account before checking out
- Store user ID on wp_term_taxonomy when new term inserted
- ‘user_register’ hook – need to distinguish if created from wp admin panel
- Make multiple URLs behave as home page
- remove_action not working for a function
- Debug a WP install: how to find which functions write post updates during a process (a woocommerce checkout in my case)
- What hook should I use to add post meta data with on update?
- Transition_Post_Status hook not working properly
- Wodpress XML Import hooks
- profile_update hook does not fire from front-end
- wp_update_post not getting triggered by hook
- How to get user profile information before update?
- Why is pre_get_posts hook invoked multiple times?
- Undefined fieldId in gform.addFilter for limiting dates in datepicker – Gravity Forms
- Get First Post content and edit it using pre_get_posts (or similar?!)
- Are there Hooks for featured image popup?
- WordPress sending data with add_action
- How to hide / remove attachment “alt” or “caption” field in Admin?
- Why does get_post() not return anything?
- Hourly events don’t get triggered
- WordPress save_post hook not firing when checking if _GET[‘post’] is set
- Access post meta just after publishing
- Which hook runs first(init,… or ???) [duplicate]
- Which hook should I use for this scenario regarding the registration process and account/profile update?
- Redirect back to origin page after using get_delete_post_link()
- $GLOBALS & global doesn’t work [closed]
- Is there any Reference of WordPress hook and hacks? [closed]
- Thesis Theme -> hooks not working for custom function
- Hooks not working on live server
- Can I display text that’s generated by a hook in another place in the HTML?
- Removing script tags that are loaded by other script tag
- Does wp_login hook fire on user registration?
- wp_trash_post not firing as expected (also applies to trashed_post)