Just change the action hook to:
add_action( 'update_history', 'update_history', 10, 4 );
It will work.
Related Posts:
- how to search users by ajax live search
- How to include PHP files in plugins the correct way
- How can you check if you are in a particular page in the WP Admin section? For example how can I check if I am in the Users > Your Profile page?
- Should I use wpdb prepare?
- Is it mandatory to use $wpdb->prefix in custom tables
- Why does WordPress add 0 (zero) to an Ajax response?
- Passing arguments to a admin menu page callback?
- function deactivate_plugins does not exist
- $wpdb->insert_id
- What is an alternative method to the WordPress private _doing_it_wrong() function
- Understanding WordPress functions’ naming conventions
- Check for success of $wpdb->update() correctly
- Using OOP plugin’s methods throughout the website
- WordPress and multithreading
- function triggered by “manage_users_custom_column” filter not working
- How can I change the frequency of a scheduled event?
- WordPress plugin how to run function when button is clicked
- When is it appropriate to put functions on page template vs. functions.php?
- $wpdb->insert is changing a value
- Actions or filters fired when data is saved in a custom table
- Shortcodes, output buffering, and WordPress functions
- How can i list current author’s categories?
- Retrieving custom fields with $wpdb->get_results
- Determine which theme location a wp_get_nav_menu_items is for
- When to check if a function exists
- Checking for existence of a page by title?
- Dynamically Override Fancy Title
- Problems with removing admin bar
- Problem with `wp_mail()`
- Really simple query giving error in SQL syntax
- Calling a function from functions.php in custom page/ blog post
- Custom Plugin Database relations
- Check if I am in the Admin Panel (wp-admin)?
- why creating tables using $wpdb is not being executed while installing plugins?
- What is the Difference between directly call a function and call a function using add_action?
- How to use mysql IN statement with wpdb update method?
- Call to undefined function get_blog_option()
- What is the difference between current_page_parent and current_page_ancestor?
- Plugin development: is adding empty index.php files necessary?
- Undefined function wp_set_password
- Using $wpdb object in a widget
- Does add_filter work outside functions.php
- What function to hook for changes made in status and visibility of a post
- Activation hook not creating table
- how to use preg_replace for wordpress video?
- Plugin Uninstall and Deactivate via Options Menu
- How can I add a CSS rule to edit.php?
- $wpdb -> Batch insert from XML File?
- wp_enqueue_script + wp_enqueue_style Since When
- How to Download and install plugin database remotely
- Widget update function not saving values
- add more custom post types and custom role to the code
- $content variable – Is this a reserved variable for a WordPress function? – php / wordpress
- How to use WP_Term with (menu) argument in the wp_nav_menu?
- WordPress after content Hook & external template part
- Enqueue scripts in footer
- override pluggable.php functions
- Retrieve contents/page names of various pages for use in a plugin
- Can wp_list_comments output into variable?
- is user logged in not working
- How to insert data to a database table when the field is not yet created?
- Can I change header.php of current theme through a plugin function?
- Where to store the name of a custom table?
- include wp-blog-header not working on MAMP
- get_current_screen() return null
- Override class inside $atts shortcode_atts in WordPress
- SQL query for custom taxonomy slugs
- add_rewrite_rule works in themes function php but when moved into plugin it stops working
- Maximum lifetime for nonce
- Where can i find wordpress auto update code flows?
- Issue regarding $wpdb->prepare()
- Error on inserting a form value to database
- How to create database table, add data, update and delete using wpdb via plugins?
- Adding option to Gallery shortcode
- Using WPDB to output raw XML fails because of wp-blog-header.php
- correct way to call javascript into hook function
- How to change the hover content of a specific menu item on WordPress?
- Adding custom end points, No error line
- Intermittent database errors when accessing WordPress database
- Remove unwanted elements for a wp_nav_menu
- How do I update a field of a meta box?
- Storing data in wordpress database from ajax call from different website
- How to add user details to different tables immediately after user registration
- mysql_real_escape_string() vs. esc_sql() in WordPress
- WordPress function get_the_terms() returns ‘Invalid taxonomy’ error
- Checking for existence of a page by title?
- how to get context information inside my funcion
- wpdb->prepare and mysql UPDATE – how is it done?
- WordPress class, using add_action to call member function does not work
- How to modify files inside wp-includes directory in wordpress
- Fatal error: Call to a member function get_page_permastruct() on a non-object
- wp_get_post_terms Order by not working
- Function/Class to list categories with checkboxes
- wp_get_theme Warning: Illegal offset type
- Why wp_die() doesn’t work with wp_redirect but exit() works
- $wpdb->prepare with LIKE and sprintf
- Warning: call_user_func_array() expects parameter 1 to be a valid callback
- Print Dashboard submenu name and filename
- Autogenerate a Table of Contents
- Alternative functions for mysql_free_result and mysql_ping in wordpress functions