edited_term_taxonomy
-
Hi,
I used the same database for 2 wordpress site with a difference of option table because of the site url and few line.
I did a cron to update the second table with the data of the first when an user add sone taxonomy for exemple but this is realy not ideal situation.
The best will be to update the database after editing or adding in the admin, so i try to do something like that :add_action( 'edited_term_taxonomy', 'wpb_custom_cron_func', 10, 2 ); function wpb_custom_cron_func() { $query = " DELETE FROM <code>wp_options_mobile</code> WHERE <code>option_id</code> NOT IN ('1', '2', '621'); INSERT INTO wp_options_mobile SELECT t1.* FROM wp_options t1 WHERE t1.option_id NOT IN ('1', '2', '621') ON DUPLICATE KEY UPDATE <code>option_id</code> = t1.<code>option_id</code>;"; $wpdb->query($query); }But i get an error 500 (the function is working, the problem is the add_action.
Any idea ?
-
-
Hi there,
Looks like you’re on the wrong forum. It appears that you’re using the self-hosted version of WordPress and you need to seek help at the WordPress.org forums:
https://wordpress.org/support/
These forums are for WordPress.com hosted sites only. If you want to know more about the differences between WordPress.com and WordPress.org you can read this document:
- The topic ‘edited_term_taxonomy’ is closed to new replies.